From 263cbd1bbe2d89880c04b69a003f98ca12ba4970 Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Sun, 22 Mar 2020 12:43:19 +0100 Subject: remove redundant closures (clippy::redundant_closure) --- src/liballoc/collections/btree/map.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/liballoc') diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs index 3ba7befc046..bde66c406af 100644 --- a/src/liballoc/collections/btree/map.rs +++ b/src/liballoc/collections/btree/map.rs @@ -196,7 +196,7 @@ impl Clone for BTreeMap { (root, length) }; - out_node.push(k, v, subroot.unwrap_or_else(|| node::Root::new_leaf())); + out_node.push(k, v, subroot.unwrap_or_else(node::Root::new_leaf)); out_tree.length += 1 + sublength; } } @@ -2147,7 +2147,7 @@ impl BTreeMap { /// If the root node is the empty (non-allocated) root node, allocate our /// own node. fn ensure_root_is_owned(&mut self) -> &mut node::Root { - self.root.get_or_insert_with(|| node::Root::new_leaf()) + self.root.get_or_insert_with(node::Root::new_leaf) } } -- cgit 1.4.1-3-g733a5