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
File renamed without changes.
8 changes: 4 additions & 4 deletions src/api_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl<'a> Builder<'a> {
self
}

pub fn build(&self) -> Result<ApiCall, Error> {
pub fn build(&self) -> Result<ApiCall<'_>, Error> {
let kind = self.kind.ok_or_else(|| anyhow!("kind error"))?;
Ok(ApiCall::new(
kind,
Expand All @@ -86,7 +86,7 @@ impl<'a> Builder<'a> {
use std::borrow::Cow;

impl<'a> ApiCall<'a> {
pub fn builder(service: &'a Service) -> Builder {
pub fn builder(service: &'a Service) -> Builder<'a> {
Builder::new(service)
}

Expand Down Expand Up @@ -136,11 +136,11 @@ impl<'a> ApiCall<'a> {
self.transaction().and_then(Transaction::user)
}

pub fn usage(&self) -> Option<&Usage> {
pub fn usage(&self) -> Option<&Usage<'_>> {
self.transaction().and_then(Transaction::usage)
}

pub fn extensions(&self) -> Option<&List> {
pub fn extensions(&self) -> Option<&List<'_>> {
self.extensions
}

Expand Down
2 changes: 1 addition & 1 deletion src/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ const APISONATOR_EXTENSION_ENCODE_SET: &AsciiSet = &PATH_SEGMENT_ENCODE_SET
.add(b'[')
.add(b']');

pub fn encode(s: &str) -> Cow<str> {
pub fn encode(s: &str) -> Cow<'_, str> {
utf8_percent_encode(s, APISONATOR_EXTENSION_ENCODE_SET).into()
}
2 changes: 1 addition & 1 deletion src/http/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl Request {
}
}

pub fn uri_and_body(&self) -> (Cow<str>, Option<&str>) {
pub fn uri_and_body(&self) -> (Cow<'_, str>, Option<&str>) {
(
self.parameters.path_and_query(self.path),
self.parameters.body(),
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub mod version;
pub mod response;

pub(crate) mod error {
pub use anyhow::{anyhow, Error, Result};
pub use anyhow::{anyhow, Error};
}

pub use error::Error;
Expand Down
4 changes: 2 additions & 2 deletions src/response/metrics_hierarchy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ impl MetricsHierarchy {
self.0.remove(parent_metric.as_ref())
}

pub fn iter(&self) -> Iter<String, Vec<String>> {
pub fn iter(&self) -> Iter<'_, String, Vec<String>> {
self.0.iter()
}

pub fn iter_mut(&mut self) -> IterMut<String, Vec<String>> {
pub fn iter_mut(&mut self) -> IterMut<'_, String, Vec<String>> {
self.0.iter_mut()
}

Expand Down
2 changes: 1 addition & 1 deletion src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl<'a> Transaction<'a> {
self.user
}

pub fn usage(&self) -> Option<&Usage> {
pub fn usage(&self) -> Option<&Usage<'_>> {
self.usage
}

Expand Down
1 change: 1 addition & 0 deletions src/util.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#[macro_use]
pub mod compat;
#[cfg(feature = "http-types")]
pub use compat::features::Never;

pub mod string;
1 change: 1 addition & 0 deletions src/util/compat/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ mod iterator_fold_self;
pub use iterator_fold_self::IteratorFoldSelfExt;

mod never;
#[cfg(feature = "http-types")]
pub use never::Never;
Loading