Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from bluss:master #5

Open
wants to merge 331 commits into
base: master
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 20, 2020

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Dec 20, 2020
@pull pull bot added the merge-conflict Resolve conflicts manually label Mar 15, 2021
cuviper and others added 28 commits March 29, 2022 16:29
Documentation assertion in erase_index function
Add dynamically-sized slices of maps and sets
Use first-class patterns for split_first/last
This moves the position of a key-value pair from one index to another by
shifting all other pairs in-between, making this an O(n) operation.

This could be used as a building-block for other operations, like #173
which wants to insert at a particular index. You can `insert_full` to
insert it _somewhere_, then choose whether to `move_index` depending on
whether you want to also change pre-existing entries.
cuviper and others added 30 commits August 28, 2024 19:35
Add a few nods to `BTreeMap`/`Set`
The only difference compared to using `shift_insert` is when the
binary-searched key isn't *actually* new to the map, just not found in
properly sorted order. In this case we can't guarantee a sorted result
either, but it will at least behave better about the new position,
especially if that's the end.
Assert bounds in `shift_insert` and add `insert_before`
This is a targeted test to make sure we cover all the heuristic edge
cases in `erase_indices`, used by `drain` and other methods.

I found a failure from `cargo mutants` where we still passed tests after
`erase_indices_sweep` was replaced with an empty body. I was concerned
because that function contains `unsafe` code, so we *really* need it
tested. It turns out that we do *sometimes* hit that in `quickcheck`
tests, but might miss that if we're randomly unlucky, so this PR adds a
new test that will hit all the edge cases every time.
Test the various heuristics of `erase_indices`
Derive `Clone` for `{map,set}::IntoIter`
docs: Improve doc formatting with backticks
It did already panic as expected, but with a confusing message if the
`to` index was out of bounds. Now we have a direct bounds check for that
at the start, just as there already was for the `from` index.
Add an explicit bounds check in `move_index`
Use `hashbrown::HashTable` instead of `RawTable`
Use rayon-1.9.0's `collect_vec_list`
Add `{Entry,VacantEntry}::insert_entry`
Mention cyclic dependency in main rustdocs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⤵️ pull merge-conflict Resolve conflicts manually
Projects
None yet
Development

Successfully merging this pull request may close these issues.