diff options
| author | bors <bors@rust-lang.org> | 2020-03-23 06:02:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-23 06:02:34 +0000 |
| commit | 8ff785011be6625e32afceee3a08e5cff7470feb (patch) | |
| tree | f9a842b8f8e390c261192943061f48d6754f65da /src/liballoc | |
| parent | 37c945dd6178cb520eb1e450a795f8c3b3cc5a3b (diff) | |
| parent | 5f91f30b0ace8a687e1acd2e057e27d4b57ad364 (diff) | |
| download | rust-8ff785011be6625e32afceee3a08e5cff7470feb.tar.gz rust-8ff785011be6625e32afceee3a08e5cff7470feb.zip | |
Auto merge of #70296 - Centril:rollup-wvfmb3n, r=Centril
Rollup of 9 pull requests Successful merges: - #69251 (#[track_caller] in traits) - #69880 (miri engine: turn error sanity checks into assertions) - #70207 (Use getentropy(2) on macos) - #70227 (Only display definition when suggesting a typo) - #70236 (resolve: Avoid "self-confirming" import resolutions in one more case) - #70248 (parser: simplify & remove unused field) - #70249 (handle ConstKind::Unresolved after monomorphizing) - #70269 (remove redundant closures (clippy::redundant_closure)) - #70270 (Clean up E0449 explanation) Failed merges: r? @ghost
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/collections/btree/map.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<K: Clone, V: Clone> Clone for BTreeMap<K, V> { (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<K, V> BTreeMap<K, V> { /// 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<K, V> { - self.root.get_or_insert_with(|| node::Root::new_leaf()) + self.root.get_or_insert_with(node::Root::new_leaf) } } |
