mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Use ? rather than if let
This commit is contained in:
parent
9205ba1d0d
commit
b3e56e88f2
|
@ -146,12 +146,10 @@ impl<K, V, ALLOCATOR: ClonableAllocator> NodeStorage<K, V, ALLOCATOR> {
|
|||
);
|
||||
|
||||
let node = &self.nodes[location];
|
||||
if let Some(node_key_ref) = node.key_ref() {
|
||||
if node_key_ref.borrow() == key {
|
||||
return Some(location);
|
||||
}
|
||||
} else {
|
||||
return None;
|
||||
let node_key_ref = node.key_ref()?;
|
||||
|
||||
if node_key_ref.borrow() == key {
|
||||
return Some(location);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue