summary refs log tree commit diff
path: root/library/alloc/src/collections/btree/map
AgeCommit message (Collapse)AuthorLines
2021-02-05Auto merge of #81257 - ↵bors-1/+1
pnkfelix:issue-80949-short-term-resolution-via-revert-of-pr-78373, r=matthewjasper Revert 78373 ("dont leak return value after panic in drop") Short term resolution for issue #80949. Reopen #47949 after this lands. (We plan to fine-tune PR #78373 to not run into this problem.)
2020-12-24BTreeMap: make test cases more explicit on failureStein Somers-1/+1
2020-12-19Rollup merge of #78083 - ChaiTRex:master, r=m-ou-seYuki Okushi-5/+7
Stabilize or_insert_with_key Stabilizes the `or_insert_with_key` feature from https://github.com/rust-lang/rust/issues/71024. This allows inserting key-derived values when a `HashMap`/`BTreeMap` entry is vacant. The difference between this and `.or_insert_with(|| ... )` is that this provides a reference to the key to the closure after it is moved with `.entry(key_being_moved)`, avoiding the need to copy or clone the key.
2020-12-07Removed spurious linebreak from new documentationChai T. Rex-1/+1
2020-12-07Improved documentation for HashMap/BTreeMap Entry's .or_insert_with_key methodChai T. Rex-3/+6
2020-12-04Avoid leaking block expression valuesMatthew Jasper-1/+1
2020-12-01Update rustc version that or_insert_with_key landedChai T. Rex-1/+1
2020-11-28BTreeMap: try to enhance various comments & local identifiersStein Somers-1/+1
2020-11-22Rollup merge of #79295 - ssomers:btree_fix_78903, r=Mark-SimulacrumMara Bos-16/+15
BTreeMap: fix minor testing mistakes in #78903 Mostly a duplicate test case r? `@Mark-Simulacrum`
2020-11-22BTreeMap: fix minor testing mistakes in #78903Stein Somers-16/+15
2020-11-21BTreeMap: address namespace conflictsStein Somers-23/+22
2020-11-18BTreeMap: reuse NodeRef as Root, keep BoxedNode for edges only, ban UniqueStein Somers-3/+3
2020-11-16Rollup merge of #78903 - ssomers:btree_order_chaos_testing, r=Mark-SimulacrumMara Bos-25/+197
BTreeMap: test chaotic ordering & other bits & bobs r? `@Mark-Simulacrum`
2020-11-13Add BTreeMap::retain and BTreeSet::retainMatt Brubeck-0/+11
2020-11-12BTreeMap: test chaotic ordering & other bits & bobsStein Somers-25/+197
2020-11-11Rollup merge of #78417 - ssomers:btree_chop_up_2, r=Mark-SimulacrumJonas Schievink-0/+27
BTreeMap: split off most code of append To complete #78056, move the last single-purpose pieces of code out of map.rs into a separate module. Also, tweaked documentation and safeness - I doubt think this code would be safe if the iterators passed in wouldn't be as sorted as the method says they should be - and bounds on MergeIterInner. r? ```@Mark-Simulacrum```
2020-11-09Rollup merge of #78437 - ssomers:btree_no_ord_at_node_level, r=Mark-SimulacrumDylan DPC-4/+22
BTreeMap: stop mistaking node for an orderly place A second mistake in #77612 was to ignore the node module's rightful comment "this module doesn't care whether the entries are sorted". And there's a much simpler way to visit the keys in order, if you check this separately from a single pass checking everything. r? ````````@Mark-Simulacrum````````
2020-11-08BTreeMap: split off most code of append, slightly improve interfacesStein Somers-0/+27
2020-11-07Rollup merge of #78538 - ssomers:btree_testing_rng, r=Mark-SimulacrumYuki Okushi-0/+1
BTreeMap: document a curious assumption in test cases r? ```@Mark-Simulacrum```
2020-10-30Constantify more BTreeMap and BTreeSet functionsBenoît du Garreau-0/+7
- BTreeMap::len - BTreeMap::is_empty - BTreeSet::len - BTreeSet::is_empty
2020-10-29BTreeMap: document a curious assumption in test casesStein Somers-0/+1
2020-10-27BTreeMap: stop mistaking node for an orderly placeStein Somers-4/+22
2020-10-24BTreeMap: stop mistaking node::MIN_LEN as a node level constraintStein Somers-2/+19
2020-10-19BTreeMap: test invariants more thoroughly and more readablyStein Somers-79/+10
2020-10-18Stabilize or_insert_with_keyChai T. Rex-2/+1
2020-10-12BTreeMap: refactor Entry out of map.rs into its own fileJacob Hughes-0/+475
btree/map.rs is approaching the 3000 line mark, splitting out the entry code buys about 500 lines of headroom
2020-10-04BTreeMap/Set: complete the compile-time test casesStein Somers-21/+37
2020-09-20BTreeMap: extra testing unveiling mistakes in future PRStein Somers-0/+19
2020-09-15Test and fix Sync & Send traits of BTreeMap artefactsStein Somers-0/+140
2020-09-09BTreeMap: avoid aliasing by avoiding slicesStein Somers-6/+9
2020-08-18BTreeMap: check some invariants, avoid recursion in depth first searchStein Somers-9/+223
2020-08-14Move btree unit test to their native, privileged locationStein Somers-0/+1491