*: Fix newly raised clippy warnings (#3106)

Fixed minor issues raised by clippy to improve correctness and readablitity.
This commit is contained in:
Hannes
2022-11-11 21:30:58 +01:00
committed by GitHub
parent 90df86d9e7
commit c32f03c317
20 changed files with 51 additions and 53 deletions

View File

@ -298,8 +298,8 @@ impl NetworkBehaviour for Relay {
// Deny if it exceeds `max_reservations`.
|| self
.reservations
.iter()
.map(|(_, cs)| cs.len())
.values()
.map(|cs| cs.len())
.sum::<usize>()
>= self.config.max_reservations
// Deny if it exceeds the allowed rate of reservations.