mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-01 20:21:21 +00:00
bucket: revert pattern matching
This commit is contained in:
parent
fe0a141e0e
commit
6ba164e6d9
@ -224,7 +224,8 @@ where
|
||||
None
|
||||
};
|
||||
|
||||
if self.insert(node.clone(), status) == InsertResult::Inserted {
|
||||
|
||||
if let InsertResult::Inserted = self.insert(node.clone(), status) {
|
||||
AppliedPending { inserted: node, evicted }
|
||||
} else {
|
||||
unreachable!("Bucket is not full, we just evicted a node.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user