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