mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-31 08:51:57 +00:00
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -202,7 +202,7 @@ impl Behaviour {
|
||||
fn new(config: identify::Config) -> Self {
|
||||
Self {
|
||||
identify: identify::Behaviour::new(config),
|
||||
keep_alive: keep_alive::Behaviour::default(),
|
||||
keep_alive: keep_alive::Behaviour,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user