Skip to content

Commit

Permalink
chore: address clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Dec 29, 2024
1 parent 18f94fa commit 1059327
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion actix-identity/src/identity_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl IdentityExt for ServiceRequest {
}
}

impl<'a> IdentityExt for GuardContext<'a> {
impl IdentityExt for GuardContext<'_> {
fn get_identity(&self) -> Result<Identity, GetIdentityError> {
Identity::extract(&self.req_data())
}
Expand Down
2 changes: 1 addition & 1 deletion actix-limitation/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl Status {
/// Constructs status limit status from parts.
#[must_use]
pub(crate) fn new(count: usize, limit: usize, reset_epoch_utc: usize) -> Self {
let remaining = if count >= limit { 0 } else { limit - count };
let remaining = limit.saturating_sub(count);

Status {
limit,
Expand Down
2 changes: 1 addition & 1 deletion actix-session/src/session_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl SessionExt for ServiceResponse {
}
}

impl<'a> SessionExt for GuardContext<'a> {
impl SessionExt for GuardContext<'_> {
fn get_session(&self) -> Session {
Session::get_session(&mut self.req_data_mut())
}
Expand Down
2 changes: 1 addition & 1 deletion actix-settings/src/settings/backlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl<'de> de::Deserialize<'de> for Backlog {
{
struct BacklogVisitor;

impl<'de> de::Visitor<'de> for BacklogVisitor {
impl de::Visitor<'_> for BacklogVisitor {
type Value = Backlog;

fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion actix-settings/src/settings/keep_alive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl<'de> de::Deserialize<'de> for KeepAlive {
{
struct KeepAliveVisitor;

impl<'de> de::Visitor<'de> for KeepAliveVisitor {
impl de::Visitor<'_> for KeepAliveVisitor {
type Value = KeepAlive;

fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion actix-settings/src/settings/max_connection_rate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl<'de> de::Deserialize<'de> for MaxConnectionRate {
{
struct MaxConnectionRateVisitor;

impl<'de> de::Visitor<'de> for MaxConnectionRateVisitor {
impl de::Visitor<'_> for MaxConnectionRateVisitor {
type Value = MaxConnectionRate;

fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion actix-settings/src/settings/max_connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl<'de> de::Deserialize<'de> for MaxConnections {
{
struct MaxConnectionsVisitor;

impl<'de> de::Visitor<'de> for MaxConnectionsVisitor {
impl de::Visitor<'_> for MaxConnectionsVisitor {
type Value = MaxConnections;

fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion actix-settings/src/settings/num_workers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl<'de> de::Deserialize<'de> for NumWorkers {
{
struct NumWorkersVisitor;

impl<'de> de::Visitor<'de> for NumWorkersVisitor {
impl de::Visitor<'_> for NumWorkersVisitor {
type Value = NumWorkers;

fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion actix-settings/src/settings/timeout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl<'de> de::Deserialize<'de> for Timeout {
{
struct TimeoutVisitor;

impl<'de> de::Visitor<'de> for TimeoutVisitor {
impl de::Visitor<'_> for TimeoutVisitor {
type Value = Timeout;

fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down

0 comments on commit 1059327

Please sign in to comment.