*: 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

@ -1265,9 +1265,9 @@ where
// Ask in random order
let mut iwant_ids_vec: Vec<_> = iwant_ids.into_iter().collect();
let mut rng = thread_rng();
iwant_ids_vec.partial_shuffle(&mut rng, iask as usize);
iwant_ids_vec.partial_shuffle(&mut rng, iask);
iwant_ids_vec.truncate(iask as usize);
iwant_ids_vec.truncate(iask);
*iasked += iask;
for message_id in &iwant_ids_vec {