about summary refs log tree commit diff
path: root/src/libstd/collections/hash/map.rs
AgeCommit message (Collapse)AuthorLines
2018-12-02Update issue number of `shrink_to` methods to point the tracking issueHidehito Yabuuchi-1/+1
2018-11-30Inline thingsJohn Kåre Alsaker-0/+7
2018-11-22Fix the tracking issue for hash_raw_entrySteven Fackler-38/+38
It used to point to the implementation PR.
2018-11-22Rollup merge of #55784 - meltinglava:master, r=KodrAusGuillaume Gomez-8/+8
Clarifying documentation for collections::hash_map::Entry::or_insert Previous version does not show that or_insert does not insert the passed value, as the passed value was the same value as what was already in the map.
2018-11-13fix various typos in doc commentsAndy Russell-1/+1
2018-11-13The example values are now easyer to differenciateMeltinglava-8/+8
2018-11-08Clarifying documentation for collections::hash_map::Entry::or_insertMeltinglava-2/+2
Previous version does not show that or_insert does not insert the passed value, as the passed value was the same value as what was already in the map.
2018-11-07Rollup merge of #55734 - teresy:shorthand-fields, r=davidtwcokennytm-1/+1
refactor: use shorthand fields refactor: use shorthand for single fields everywhere (excluding tests).
2018-11-06refactor: use shorthand fieldsteresy-1/+1
2018-11-02Auto merge of #54043 - fintelia:raw_entry, r=alexcrichtonbors-6/+672
Add raw_entry API to HashMap This is a continuation of #50821.
2018-10-31A couple suggested editsJonathan Behrens-7/+3
2018-10-30Add example of using the indexing operator to HashMap docsFlorian Hartwig-0/+3
2018-09-13Entry is an enum not a structJonathan Behrens-1/+1
2018-09-13Fix links in docsJonathan Behrens-2/+7
2018-09-13Eliminate unused variable warningJonathan Behrens-1/+1
2018-09-13Fix tests and update issue numberJonathan Behrens-138/+156
2018-09-13Remove println!() statement from HashMap unit testJonathan Behrens-1/+0
2018-09-12Fix formattingJonathan Behrens-1/+2
2018-09-10fix typos in growth algo descriptionVal-4/+4
modified to read "the first table overflows into the second, and the second into the first." plus smaller typos
2018-09-07Cleanup API somewhatJonathan Behrens-217/+195
2018-09-06Fix invalid urlsGuillaume Gomez-3/+2
2018-09-05disambiguate hashesAlexis Beingessner-3/+3
2018-09-05fixup Debug boundsAlexis Beingessner-2/+2
2018-09-05progress on raw_entryAlexis Beingessner-229/+231
2018-09-05WIP: add raw_entry API to HashMapAlexis Beingessner-37/+703
2018-06-29Move core::alloc::CollectionAllocErr to alloc::collectionsSimon Sapin-1/+1
2018-06-18Prefer use of owned values in examplesKornel-11/+25
2018-06-10Stabilize entry-or-defaultGuillaume Gomez-3/+1
2018-06-02Add a couple lines describing differences between into_mut/get_mut.Corey Farwell-0/+9
2018-06-02Fixed typoPhlosioneer-1/+1
2018-06-02Clarify the difference between get_mut and into_mut for OccupiedEntryPhlosioneer-2/+6
The examples for both hash_map::OccupiedEntry::get_mut and hash_map::OccupiedEntry::into_mut were almost identical. This led to some confusion over the difference, namely why you would ever use get_mut when into_mut gives alonger lifetime. Reddit thread: https://www.reddit.com/r/rust/comments/8a5swr/why_does_hashmaps This commit adds two lines and a comment to the example, to show that the entry object can be re-used after calling get_mut.
2018-05-30Pass a `Layout` to `oom`Mike Hommey-10/+29
As discussed in https://github.com/rust-lang/rust/issues/49668#issuecomment-384893456 and subsequent, there are use-cases where the OOM handler needs to know the size of the allocation that failed. The alignment might also be a cause for allocation failure, so providing it as well can be useful.
2018-04-28std: Inline `DefaultResizePolicy::new`Alex Crichton-0/+1
This should allow us to tighten up the [codegen][example] a bit more, avoiding a function call across object boundaries in the default optimized case. [example]: https://play.rust-lang.org/?gist=c1179088b0f8a4dcd93a9906463f993d&version=stable&mode=release
2018-04-22Replace GlobalAlloc::oom with a lang itemSteven Fackler-2/+2
2018-04-20Auto merge of #50088 - alexcrichton:std-tweaks, r=sfacklerbors-2/+2
Tweak some stabilizations in libstd This commit tweaks a few stable APIs in the `beta` branch before they hit stable. The `str::is_whitespace` and `str::is_alphanumeric` functions were deleted (added in #49381, issue at #49657). The `and_modify` APIs added in #44734 were altered to take a `FnOnce` closure rather than a `FnMut` closure. Closes #49581 Closes #49657
2018-04-19Tweak some stabilizations in libstdAlex Crichton-2/+2
This commit tweaks a few stable APIs in the `beta` branch before they hit stable. The `str::is_whitespace` and `str::is_alphanumeric` functions were deleted (added in #49381, issue at #49657). The `and_modify` APIs added in #44734 were altered to take a `FnOnce` closure rather than a `FnMut` closure. Closes #49581 Closes #49657
2018-04-17stabilize `hash_map_remove_entry` featuretinaun-2/+1
2018-04-12Remove the now-unit-struct AllocErr field inside CollectionAllocErrSimon Sapin-2/+2
2018-04-12Remove the now-unit-struct AllocErr parameter of oom()Simon Sapin-1/+1
2018-04-12Actually deprecate the Heap typeSimon Sapin-2/+2
2018-04-12Import the `alloc` crate as `alloc_crate` in stdSimon Sapin-3/+1
… to make the name `alloc` available.
2018-04-03Remove all unstable placement featuresAidan Hobson Sayers-150/+1
Closes #22181, #27779
2018-04-02Use Alloc and Layout from core::heap.Mike Hommey-1/+2
94d1970bba87f2d2893f6e934e4c3f02ed50604d moved the alloc::allocator module to core::heap, moving e.g. Alloc and Layout out of the alloc crate. While alloc::heap reexports them, it's better to use them from where they really come from.
2018-03-28Rollup merge of #49400 - Diggsey:shrink-to, r=joshtriplettkennytm-0/+40
Implement `shrink_to` method on collections Fixes #49385
2018-03-27Implement `shrink_to` method on collectionsDiggory Blake-0/+40
2018-03-25Implement get_key_value for HashMap, BTreeMapDiggory Blake-0/+28
2018-03-15setting ABORTING_MALLOC for asmjs backendsnf-4/+0
2018-03-14try_reserve: disabling tests for asmjs, blocked by #48968snf-0/+4
2018-03-14implementing fallible allocation API (try_reserve) for Vec, String and HashMapsnf-13/+83
2018-03-06Rollup merge of #47463 - bluss:fused-iterator, r=alexcrichtonkennytm-7/+7
Stabilize FusedIterator FusedIterator is a marker trait that promises that the implementing iterator continues to return `None` from `.next()` once it has returned `None` once (and/or `.next_back()`, if implemented). The effects of FusedIterator are already widely available through `.fuse()`, but with stable `FusedIterator`, stable Rust users can implement this trait for their iterators when appropriate. Closes #35602