rust/library/alloc/src/collections
Matthias Krüger 562581c2db
Rollup merge of #105641 - Amanieu:btree_cursor, r=m-ou-se
Implement cursors for BTreeMap

See the ACP for an overview of the API: https://github.com/rust-lang/libs-team/issues/141

The implementation is split into 2 commits:
- The first changes the internal insertion functions to return a handle to the newly inserted element. The lifetimes involved are a bit hairy since we need a mutable handle to both the `BTreeMap` itself (which holds the root) and the nodes allocated in memory. I have tested that this passes the standard library testsuite under miri.
- The second commit implements the cursor API itself. This is more straightforward to follow but still involves some unsafe code to deal with simultaneous mutable borrows of the tree root and the node that is currently being iterated.
2023-02-08 18:32:41 +01:00
..
binary_heap Document guarantees about BinaryHeap invariant 2023-01-14 13:28:30 -08:00
btree BTreeMap: Add Cursor and CursorMut 2023-02-01 00:16:15 +00:00
linked_list Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00
vec_deque Set version placeholders to 1.68 2023-01-25 09:44:29 -05:00
linked_list.rs more dupe word typos 2022-10-14 12:57:56 +08:00
mod.rs Modify comment syntax error 2022-11-07 14:33:33 +08:00