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