about summary refs log tree commit diff
path: root/library/std/src/collections/hash/map
AgeCommit message (Collapse)AuthorLines
2025-03-12Remove `feature = "hash_raw_entry"`Josh Stone-93/+0
2024-11-02const_with_hasher test: actually construct a usable HashMapRalf Jung-3/+23
2024-10-25library: consistently use American spelling for 'behavior'Ralf Jung-1/+1
2024-10-01make test_lots_of_insertions test take less long in MiriRalf Jung-1/+1
2024-09-29Fix std tests for wasm32-wasip2 targetNicola Krumschmidt-0/+3
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-3/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2023-11-02Move RandomState and DefaultHasher into std::hash, but don't export for nowltdk-1/+1
2023-06-14update hashbrown and replace Hash{Set,Map}::DrainFilter with ExtractIfThe 8472-12/+14
2023-01-04Update rand in the stdlib tests, and remove the getrandom feature from itThom Chiovoloni-4/+5
2022-10-02Make Hash{Set,Map}::with_hasher unstably constNixon Enraght-Moony-0/+6
2022-08-18make many std tests work in MiriRalf Jung-10/+14
2022-03-10Use implicit capture syntax in format_argsT-O-R-U-S-3/+3
This updates the standard library's documentation to use the new syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored).
2022-01-22Disable test_try_reserve on AndroidAmanieu d'Antras-0/+1
2022-01-21Update HashMap::try_reserve test to version from hashbrownAmanieu d'Antras-5/+15
2022-01-09eplace usages of vec![].into_iter with [].into_iterLucas Kent-10/+10
2021-08-07Use assert_matches! instead of if let {} elseKornel-9/+12
2021-08-07Auto merge of #87408 - kornelski:try_reserve_error, r=yaahcbors-3/+3
Hide allocator details from TryReserveError I think there's [no need for TryReserveError to carry detailed information](https://github.com/rust-lang/rust/issues/48043#issuecomment-825139280), but I wouldn't want that issue to delay stabilization of the `try_reserve` feature. So I'm proposing to stabilize `try_reserve` with a `TryReserveError` as an opaque structure, and if needed, expose error details later. This PR moves the `enum` to an unstable inner `TryReserveErrorKind` that lives under a separate feature flag. `TryReserveErrorKind` could possibly be left as an implementation detail forever, and the `TryReserveError` get methods such as `allocation_size() -> Option<usize>` or `layout() -> Option<Layout>` instead, or the details could be dropped completely to make try-reserve errors just a unit struct, and thus smaller and cheaper.
2021-07-24Hide allocator details from TryReserveErrorKornel-3/+3
2021-06-30impl From<[(K, V); N]> for std::collectionsbstrie-0/+12
2021-03-03Fix std testsRyan Levick-4/+4
2020-09-08Tests for HashMap/HashSet::drain_filterMatt Brubeck-0/+161
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-0/+926
Also doing fmt inplace as requested.