style: Rustfmt recent changes.

This commit is contained in:
Emilio Cobos Álvarez 2019-06-02 23:09:42 -04:00
parent f7240751f5
commit 665db79274
8 changed files with 46 additions and 26 deletions

View file

@ -84,7 +84,11 @@ impl MallocSizeOf for RuleTree {
while let Some(node) = stack.pop() {
n += unsafe { ops.malloc_size_of(node.ptr()) };
stack.extend(unsafe {
(*node.ptr()).children.read().iter().map(|(_k, v)| v.clone())
(*node.ptr())
.children
.read()
.iter()
.map(|(_k, v)| v.clone())
});
}
@ -958,9 +962,7 @@ impl StrongRuleNode {
}
match RwLockUpgradableReadGuard::upgrade(read_guard).entry(key) {
hash::map::Entry::Occupied(ref occupied) => {
occupied.get().upgrade()
}
hash::map::Entry::Occupied(ref occupied) => occupied.get().upgrade(),
hash::map::Entry::Vacant(vacant) => {
let new_node = StrongRuleNode::new(Box::new(RuleNode::new(
root,
@ -972,7 +974,7 @@ impl StrongRuleNode {
vacant.insert(new_node.downgrade());
new_node
}
},
}
}