about summary refs log tree commit diff
path: root/src/libstd/collections/hash/set.rs
AgeCommit message (Collapse)AuthorLines
2019-10-01Remove unneeded `fn main` blocks from docsLzu Tao-5/+3
2019-08-16Rename CollectionAllocError to TryReserveErrorSimon Sapin-2/+2
2019-07-16Test that maplike FromIter satisfies uniquenessNick Hynes-1/+3
2019-05-16Comment why get_or_insert returns &TJosh Stone-0/+4
2019-05-16Add a hash_set_entry tracking issueJosh Stone-2/+2
2019-05-16Add entry-like methods to HashSetJosh Stone-0/+52
* `HashSet::get_or_insert` * `HashSet::get_or_insert_with` These provide a simplification of the `Entry` API for `HashSet`, with names chosen to match the similar methods on `Option`.
2019-04-24Replace the robin-hood hash table with hashbrownAmanieu d'Antras-2/+0
2019-04-24Mark HashSet functions with #[inline]Amanieu d'Antras-0/+45
2019-04-24Add try_reserve to HashSetAmanieu d'Antras-0/+24
2019-04-24Remove the Recover trait for HashSetAmanieu d'Antras-4/+9
2019-04-03improve worst-case performance of HashSet.is_subsetStein Somers-1/+5
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-10/+10
2019-03-16Rollup merge of #59082 - alexreg:cosmetic-2-doc-comments, r=Centrilkennytm-1/+1
A few improvements to comments in user-facing crates Not too many this time, and all concern comments (almost all doc comments) in user-facing crates (libstd, libcore, liballoc). r? @steveklabnik
2019-03-11Improvements to comments in libstd, libcore, liballoc.Alexander Regueiro-1/+1
2019-03-09Use lifetime contravariance to elide more lifetimes in core+alloc+stdScott McMurray-4/+4
2019-02-28libstd => 2018Taiki Endo-6/+6
2019-02-25Rollup merge of #58370 - nox:relax-bounds, r=dtolnayMazdak Farrokhzad-118/+114
Relax some Hash bounds on HashMap<K, V, S> and HashSet<T, S> Notably, hash iterators don't require any trait bounds to be iterated.
2019-02-20Rollup merge of #58553 - scottmcm:more-ihle, r=Centrilkennytm-24/+24
Use more impl header lifetime elision Inspired by seeing explicit lifetimes on these two: - https://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#impl-FusedIterator - https://doc.rust-lang.org/nightly/std/primitive.u32.html#impl-Not And a follow-up to https://github.com/rust-lang/rust/pull/54687, that started using IHLE in libcore. Most of the changes in here fall into two big categories: - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop`, `Debug`, and `Clone`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations [where the flipped one cannot elide the lifetime](https://internals.rust-lang.org/t/impl-type-parameter-aliases/9403/2?u=scottmcm). I also removed two lifetimes that turned out to be completely unused; see https://github.com/rust-lang/rust/issues/41960#issuecomment-464557423
2019-02-17Use more impl header lifetime elisionScott McMurray-24/+24
There are two big categories of changes in here - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop` & `Debug`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations where the flipped one cannot elide the lifetime.
2019-02-13Relax some Hash bounds on HashMap<K, V, S> and HashSet<T, S>Anthony Ramine-118/+114
Notably, hash iterators don't require any trait bounds to be iterated.
2019-02-10libs: doc commentsAlexander Regueiro-2/+2
2019-01-09Fix poor worst case performance of is_disjointStein Somers-2/+5
2019-01-09Merge remote-tracking branch 'upstream/master'Stein Somers-11/+1
2019-01-03Fix repeated word typosWiktor Kuchta-1/+1
Found with `git grep -P '\b([a-z]+)\s+\1\b'`
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-21Fix poor worst case performance of set intersection (and union, somewhat) on ↵Stein Somers-6/+56
asymmetrically sized sets and extend unit tests slightly beyond that
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-6/+6
2018-12-02Update issue number of `shrink_to` methods to point the tracking issueHidehito Yabuuchi-1/+1
2018-06-18Prefer use of owned values in examplesKornel-12/+12
2018-03-27Implement `shrink_to` method on collectionsDiggory Blake-0/+28
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
2018-03-05Remove a couple of `isize` references from hashmap docsTobias Bucher-2/+2
Also fix a spelling mistake.
2018-03-03core: Update stability attributes for FusedIteratorUlrik Sverdrup-7/+7
2018-03-03core: Stabilize FusedIteratorUlrik Sverdrup-7/+7
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.
2018-01-05Write examples for {BTree,Hash}Set::{get,replace,take}Stjepan Glavina-0/+33
2017-12-09Use Try syntax for Option in place of macros or matchMatt Brubeck-14/+6
2017-09-15HashMap::new and HashSet::new do not allocateJon Gjengset-0/+3
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-2/+2
Like #43008 (f668999), but _much more aggressive_.
2017-08-01Add doc example for HashSet::drain.Corey Farwell-0/+16
2017-08-01Remove unnecessary clones in doc examples.Corey Farwell-11/+11
2017-08-01Show the capacity in HashSet::with_capacity doc example.Corey Farwell-0/+1
2017-08-01Remove unnecessary 'mut' bindings.Corey Farwell-2/+2
2017-08-01Indicate HashSet is code-like in docs.Corey Farwell-1/+1
2017-08-01Show that the capacity changed in HashSet::reserve doc example.Corey Farwell-0/+1
2017-08-01Add doc example for HashSet::hasher.Corey Farwell-0/+11
2017-05-20Stabilize library features for 1.18.0Steven Fackler-32/+21
Closes #38863 Closes #38980 Closes #38903 Closes #36648
2017-04-22Fix invalid linkageGuillaume Gomez-1/+1
2017-04-13Various consistency and phrasing fixes in std::collections' docslukaramu-2/+1
* Changed btree_map's and hash_map's Entry (etc.) docs to be consistent * Changed VecDeque's type and module summary sentences to be consistent with each other as well as with other summary sentences in the module * Changed HashMap's and HashSet's summary sentences to be less redundantly phrased and also more consistant with the other summary sentences in the module * Also, added an example to Bound
2017-04-13Various fixes throughout std::collections' docslukaramu-20/+41
* Added links where possible (limited because of facading) * Changed references to methods from `foo()` to `foo` in module docs * Changed references to methods from `HashMap::foo` to just `foo` in top-level docs for `HashMap` and the `default` doc for `DefaultHasher` * Various small other fixes
2017-04-13Update std::collections' docs to use iterator (etc.) boilerplatelukaramu-7/+49
This greatly improves consistency.