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