about summary refs log tree commit diff
path: root/library/std/src/collections/hash/map
AgeCommit message (Collapse)AuthorLines
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.