Skip to content

Commit

Permalink
New clippy lints
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Cattermole <acatterm@redhat.com>
  • Loading branch information
adam-cattermole committed Jan 17, 2025
1 parent 57622d8 commit d95415e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions limitador/src/storage/distributed/grpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ impl ReplicationState {
}

fn match_for_io_error(err_status: &Status) -> Option<&std::io::Error> {
let mut err: &(dyn Error + 'static) = err_status;
let err: &(dyn Error + 'static) = err_status;

loop {
if let Some(io_err) = err.downcast_ref::<std::io::Error>() {
Expand All @@ -328,10 +328,7 @@ fn match_for_io_error(err_status: &Status) -> Option<&std::io::Error> {
}
}

err = match err.source() {
Some(err) => err,
None => return None,
};
err.source()?;
}
}

Expand Down
2 changes: 1 addition & 1 deletion limitador/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl AsyncStorage {
self.counters.update_counter(counter, delta).await
}

pub async fn check_and_update<'a>(
pub async fn check_and_update(
&self,
counters: &mut Vec<Counter>,
delta: u64,
Expand Down

0 comments on commit d95415e

Please sign in to comment.