Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ cargo run

### Usage

```
$ cd examples/cli && cargo run
cli 0.1.0
```bash
# Run this from the project root
$ cargo run --example cli
axiom-rs 0.11.2

USAGE:
cli <SUBCOMMAND>
Expand All @@ -55,5 +56,5 @@ This example ingests all HN posts into an Axiom dataset.
```sh
export DATASET_NAME=<your dataset name>
export AXIOM_TOKEN=<your api token>
cargo run
cargo run --example ingest-hn
```
9 changes: 5 additions & 4 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@ impl Client {

/// Dataset API
#[must_use]
pub fn datasets(&self) -> datasets::Client {
pub fn datasets(&self) -> datasets::Client<'_> {
datasets::Client::new(&self.http_client)
}

/// Users API
#[must_use]
pub fn users(&self) -> users::Client {
pub fn users(&self) -> users::Client<'_> {
users::Client::new(&self.http_client)
}

/// Annotations API
#[must_use]
pub fn annotations(&self) -> annotations::Client {
pub fn annotations(&self) -> annotations::Client<'_> {
annotations::Client::new(&self.http_client)
}

Expand All @@ -112,7 +112,8 @@ impl Client {
}

/// Executes the given query specified using the Axiom Processing Language (APL).
/// To learn more about APL, see the APL documentation at https://www.axiom.co/docs/apl/introduction.
/// To learn more about APL, see the APL documentation at
/// <https://www.axiom.co/docs/apl/introduction>.
///
/// # Errors
///
Expand Down
4 changes: 2 additions & 2 deletions src/datasets/model/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl Table {

/// Returns a single row from the table.
#[must_use]
pub fn get_row(&self, row: usize) -> Option<Row> {
pub fn get_row(&self, row: usize) -> Option<Row<'_>> {
if self.len() > row {
Some(Row { table: self, row })
} else {
Expand All @@ -291,7 +291,7 @@ impl Table {

/// Returns an iterator over the rows.
#[must_use]
pub fn iter(&self) -> RowIter {
pub fn iter(&self) -> RowIter<'_> {
RowIter {
table: self,
row: 0,
Expand Down
6 changes: 3 additions & 3 deletions src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ mod test {
assert_eq!(limits.reset.timestamp(), tomorrow.timestamp());
}
res => panic!("Expected ingest limit error, got {:?}", res),
};
}

rate_mock.assert_hits_async(1).await;
Ok(())
Expand Down Expand Up @@ -342,7 +342,7 @@ mod test {
assert_eq!(limits.reset.timestamp(), tomorrow.timestamp());
}
res => panic!("Expected ingest limit error, got {:?}", res),
};
}

rate_mock.assert_hits_async(1).await;
Ok(())
Expand Down Expand Up @@ -381,7 +381,7 @@ mod test {
assert_eq!(limits.reset.timestamp(), tomorrow.timestamp());
}
res => panic!("Expected ingest limit error, got {:?}", res),
};
}

rate_mock.assert_hits_async(1).await;
Ok(())
Expand Down
Loading