mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-30 18:21:33 +00:00
*: Fix newly raised clippy warnings (#3106)
Fixed minor issues raised by clippy to improve correctness and readablitity.
This commit is contained in:
@ -310,7 +310,7 @@ fn handle_outbound_event(
|
||||
expiring_registrations.extend(registrations.iter().cloned().map(|registration| {
|
||||
async move {
|
||||
// if the timer errors we consider it expired
|
||||
futures_timer::Delay::new(Duration::from_secs(registration.ttl as u64)).await;
|
||||
futures_timer::Delay::new(Duration::from_secs(registration.ttl)).await;
|
||||
|
||||
(registration.record.peer_id(), registration.namespace)
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ impl Registrations {
|
||||
self.registrations
|
||||
.insert(registration_id, registration.clone());
|
||||
|
||||
let next_expiry = futures_timer::Delay::new(Duration::from_secs(ttl as u64))
|
||||
let next_expiry = futures_timer::Delay::new(Duration::from_secs(ttl))
|
||||
.map(move |_| registration_id)
|
||||
.boxed();
|
||||
|
||||
|
Reference in New Issue
Block a user