mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +00:00
fix: deal with new lints from beta clippy (#3389)
Most of this is trivial, apart from the rename of the `clippy::derive_hash_xor_eq` lint to `clippy::derived_hash_with_manual_eq`. Instead of allowing that lint, we manually implement `PartialEq` and add a comment why the difference between the `PartialEq` and `Hash` implementations are okay.
This commit is contained in:
@ -3236,10 +3236,7 @@ fn random_message(seq: &mut u64, topics: &Vec<TopicHash>) -> RawMessage {
|
||||
*seq += 1;
|
||||
RawMessage {
|
||||
source: Some(PeerId::random()),
|
||||
data: (0..rng.gen_range(10..30))
|
||||
.into_iter()
|
||||
.map(|_| rng.gen())
|
||||
.collect(),
|
||||
data: (0..rng.gen_range(10..30)).map(|_| rng.gen()).collect(),
|
||||
sequence_number: Some(*seq),
|
||||
topic: topics[rng.gen_range(0..topics.len())].clone(),
|
||||
signature: None,
|
||||
@ -4311,7 +4308,6 @@ fn test_opportunistic_grafting() {
|
||||
|
||||
//add additional 5 peers
|
||||
let others: Vec<_> = (0..5)
|
||||
.into_iter()
|
||||
.map(|_| add_peer(&mut gs, &topics, false, false))
|
||||
.collect();
|
||||
|
||||
@ -4670,7 +4666,7 @@ fn test_limit_number_of_message_ids_inside_ihave() {
|
||||
(this may fail with a probability < 10^-58"
|
||||
);
|
||||
assert!(
|
||||
ihaves1.intersection(&ihaves2).into_iter().count() > 0,
|
||||
ihaves1.intersection(&ihaves2).count() > 0,
|
||||
"should have sent random messages with some common messages to p1 and p2 \
|
||||
(this may fail with a probability < 10^-58"
|
||||
);
|
||||
|
Reference in New Issue
Block a user