fix: apply suggestions from 1.71 clippy beta

Pull-Request: #4009.
This commit is contained in:
Thomas Eizinger
2023-05-30 15:30:04 +02:00
committed by GitHub
parent efb117e236
commit ddc2b879e2
6 changed files with 9 additions and 9 deletions

View File

@ -5099,7 +5099,7 @@ fn test_msg_id_fn_only_called_once_with_fast_message_ids() {
}
let message_id_fn = |m: &Message| -> MessageId {
let (mut id, mut counters_pointer): (MessageId, *mut Pointers) =
let (mut id, counters_pointer): (MessageId, *mut Pointers) =
get_counters_and_hash!(&m.data);
unsafe {
(*counters_pointer).slow_counter += 1;
@ -5108,7 +5108,7 @@ fn test_msg_id_fn_only_called_once_with_fast_message_ids() {
id
};
let fast_message_id_fn = |m: &RawMessage| -> FastMessageId {
let (id, mut counters_pointer) = get_counters_and_hash!(&m.data);
let (id, counters_pointer) = get_counters_and_hash!(&m.data);
unsafe {
(*counters_pointer).fast_counter += 1;
}

View File

@ -649,7 +649,7 @@ impl PeerScore {
}
let peers: Vec<_> = {
let mut record = self
let record = self
.deliveries
.entry(msg_id.clone())
.or_insert_with(DeliveryRecord::default);