mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Replace .map().flatten() with .and_then()
This commit is contained in:
parent
280e7f876d
commit
e68a4d373f
|
@ -314,8 +314,7 @@ where
|
|||
|
||||
self.nodes
|
||||
.get_location(key, hash)
|
||||
.map(|location| self.nodes.nodes[location].get_value_ref())
|
||||
.flatten()
|
||||
.and_then(|location| self.nodes.nodes[location].get_value_ref())
|
||||
}
|
||||
|
||||
pub fn get_mut(&mut self, key: &K) -> Option<&mut V> {
|
||||
|
|
Loading…
Reference in a new issue