Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions muxers/mplex/src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,43 +299,43 @@ impl Encoder for Codec {
role: Endpoint::Listener,
},
data,
} => (num << 3 | 1, data),
} => ((num << 3) | 1, data),
Frame::Data {
stream_id:
LocalStreamId {
num,
role: Endpoint::Dialer,
},
data,
} => (num << 3 | 2, data),
} => ((num << 3) | 2, data),
Frame::Close {
stream_id:
LocalStreamId {
num,
role: Endpoint::Listener,
},
} => (num << 3 | 3, Bytes::new()),
} => ((num << 3) | 3, Bytes::new()),
Frame::Close {
stream_id:
LocalStreamId {
num,
role: Endpoint::Dialer,
},
} => (num << 3 | 4, Bytes::new()),
} => ((num << 3) | 4, Bytes::new()),
Frame::Reset {
stream_id:
LocalStreamId {
num,
role: Endpoint::Listener,
},
} => (num << 3 | 5, Bytes::new()),
} => ((num << 3) | 5, Bytes::new()),
Frame::Reset {
stream_id:
LocalStreamId {
num,
role: Endpoint::Dialer,
},
} => (num << 3 | 6, Bytes::new()),
} => ((num << 3) | 6, Bytes::new()),
};

let mut header_buf = encode::u64_buffer();
Expand Down
4 changes: 2 additions & 2 deletions protocols/kad/src/kbucket/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ where
// The bucket is full with connected nodes. Drop the pending node.
return None;
}
debug_assert!(self.first_connected_pos.map_or(true, |p| p > 0)); // (*)
// The pending node will be inserted.
debug_assert!(self.first_connected_pos.is_none_or(|p| p > 0)); // (*)
// The pending node will be inserted.
let inserted = pending.node.clone();
// A connected pending node goes at the end of the list for
// the connected peers, removing the least-recently connected.
Expand Down
1 change: 0 additions & 1 deletion protocols/kad/src/query/peers/closest/disjoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,6 @@ mod tests {
.flatten()
.collect::<HashSet<_>>()
.into_iter()
.map(Key::from)
.collect::<Vec<_>>();

deduplicated.sort_unstable_by(|a, b| {
Expand Down
Loading