about summary refs log tree commit diff
path: root/src/libstd/collections/mod.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-446/+0
2020-07-19Use italics for O notationpierwill-1/+1
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2020-04-15big-O notation: parenthesis, multiplication and backticksRalf Jung-4/+4
2019-12-09Update HashMap documentation hint of the used 'quadratic probing' and 'SIMD ↵Christoph Schmidler-1/+1
lookup' algorithms
2019-11-29Format libstd with rustfmtDavid Tolnay-5/+5
This commit applies rustfmt with rust-lang/rust's default settings to files in src/libstd *that are not involved in any currently open PR* to minimize merge conflicts. THe list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in outstanding_files, the relevant commands were: $ find src/libstd -name '*.rs' \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ rg libstd outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of libstd. To confirm no funny business: $ git checkout $THIS_COMMIT^ $ git show --pretty= --name-only $THIS_COMMIT \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ git diff $THIS_COMMIT # there should be no difference
2019-08-16Rename CollectionAllocError to TryReserveErrorSimon Sapin-1/+1
2019-04-15Remove collection-specific `with_capacity` doc from `std::collections`Marc-4/+3
Fixes #59931
2019-02-28libstd => 2018Taiki Endo-1/+1
2019-02-10libs: doc commentsAlexander Regueiro-2/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-06-29Move core::alloc::CollectionAllocErr to alloc::collectionsSimon Sapin-1/+1
2018-06-29Move some alloc crate top-level items to a new alloc::collections moduleSimon Sapin-4/+4
This matches std::collections
2018-06-11Remove deprecated heap modulesSimon Sapin-1/+1
The heap.rs file was already unused.
2018-05-24remove collections::range::RangeArgumentCory Sherman-8/+0
was already moved to ops::RangeBounds (see #30877)
2018-04-12Import the `alloc` crate as `alloc_crate` in stdSimon Sapin-5/+5
… to make the name `alloc` available.
2018-03-29Hide the Bound type in docs at its deprecated location in std::collectionsSimon Sapin-0/+1
2018-03-29Hide the deprecated std::collections::range module from docsSimon Sapin-0/+1
2018-03-29Move RangeArguments to {core::std}::ops and rename to RangeBoundsSimon Sapin-2/+6
These unstable items are deprecated: * The `std::collections::range::RangeArgument` reexport * The `std::collections::range` module.
2018-03-29Move alloc::Bound to {core,std}::opsSimon Sapin-1/+2
The stable reexport `std::collections::Bound` is now deprecated. Another deprecated reexport could be added in `alloc`, but that crate is unstable.
2018-03-14implementing fallible allocation API (try_reserve) for Vec, String and HashMapsnf-0/+3
2018-01-19Update BTreeMap recommendationArthur Silva-2/+2
Focus on the ordering/range benefit.
2017-06-30Revert "Stabilize RangeArgument"Steven Fackler-2/+0
This reverts commit 143206d54d7558c2326212df99efc98110904fdb.
2017-06-24Stabilize RangeArgumentSteven Fackler-0/+2
Move it and Bound to core::ops while we're at it. Closes #30877
2017-06-13Merge crate `collections` into `alloc`Murarth-6/+6
2017-04-13Various consistency and phrasing fixes in std::collections' docslukaramu-4/+2
* 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-28/+28
* 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-02-09Fix missing article.Henning Kowalk-1/+1
2017-02-09Fixed #39661Henning Kowalk-1/+1
Clarified potential ambiguity.
2016-10-20Add missing urls in collections moduleGuillaume Gomez-55/+65
2016-10-17std::collections: Reexport libcollections's range moduleUlrik Sverdrup-0/+3
This is overdue, even if range and RangeArgument is still unstable. The stability attributes are the same ones as the other unstable item (Bound) here, they don't seem to matter.
2016-06-17Add short summaries to btree modulesOliver Middleton-2/+4
Also improve hash_map and hash_set module short summaries.
2016-04-22Implement `append` for b-trees.Johannes Oertel-6/+4
The algorithm implemented here is linear in the size of the two b-trees. It firsts creates a `MergeIter` from the two b-trees and then builds a new b-tree by pushing key-value pairs from the `MergeIter` into nodes at the right heights. Three functions for stealing have been added to the implementation of `Handle` as well as a getter for the height of a `NodeRef`. The docs have been updated with performance information about `BTreeMap::append` and the remark about B has been removed now that it is the same for all instances of `BTreeMap`.
2016-03-12std: Clean out deprecated APIsAlex Crichton-10/+0
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that are deprecated in the 1.8 release are sticking around for the rest of this cycle. Some notable changes are: * The `dynamic_lib` module was moved into `rustc_back` as the compiler still relies on a few bits and pieces. * The `DebugTuple` formatter now special-cases an empty struct name with only one field to append a trailing comma.
2016-02-15clarify how insert() doesn't update keysJack O'Connor-3/+6
The first time I read the docs for `insert()`, I thought it was saying it didn't update existing *values*, and I was confused. Reword the docs to make it clear that `insert()` does update values.
2016-01-26std: Stabilize custom hasher support in HashMapAlex Crichton-0/+2
This commit implements the stabilization of the custom hasher support intended for 1.7 but left out due to some last-minute questions that needed some decisions. A summary of the actions done in this PR are: Stable * `std::hash::BuildHasher` * `BuildHasher::Hasher` * `BuildHasher::build_hasher` * `std::hash::BuildHasherDefault` * `HashMap::with_hasher` * `HashMap::with_capacity_and_hasher` * `HashSet::with_hasher` * `HashSet::with_capacity_and_hasher` * `std::collections::hash_map::RandomState` * `RandomState::new` Deprecated * `std::collections::hash_state` * `std::collections::hash_state::HashState` - this trait was also moved into `std::hash` with a reexport here to ensure that we can have a blanket impl to prevent immediate breakage on nightly. Note that this is unstable in both location. * `HashMap::with_hash_state` - renamed * `HashMap::with_capacity_and_hash_state` - renamed * `HashSet::with_hash_state` - renamed * `HashSet::with_capacity_and_hash_state` - renamed Closes #27713
2015-11-18Add missing annotations and some testsVadim Petrochenkov-1/+9
2015-10-25Remove key duplication from `BTreeMap` example in `collections`Tobias Bucher-4/+4
2015-10-22Document replacement behavior in some collectionsSteve Klabnik-0/+46
{BTree,Hash}{Map,Set} will not update their key if it already exists, which can matter with more complex keys. This behavior is now documented. Fixes #26888
2015-08-25collections doc: remove mention of BitVec, BitSet, VecMapGeorg Brandl-28/+6
These have been removed and should not be documented here.
2015-08-15std: Add issues to all unstable featuresAlex Crichton-1/+2
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-4/+4
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-06-18Auto merge of #26192 - alexcrichton:features-clean, r=aturonbors-1/+1
This commit shards the all-encompassing `core`, `std_misc`, `collections`, and `alloc` features into finer-grained components that are much more easily opted into and tracked. This reflects the effort to push forward current unstable APIs to either stabilization or removal. Keeping track of unstable features on a much more fine-grained basis will enable the library subteam to quickly analyze a feature and help prioritize internally about what APIs should be stabilized. A few assorted APIs were deprecated along the way, but otherwise this change is just changing the feature name associated with each API. Soon we will have a dashboard for keeping track of all the unstable APIs in the standard library, and I'll also start making issues for each unstable API after performing a first-pass for stabilization.
2015-06-17std: Split the `std_misc` featureAlex Crichton-1/+1
2015-06-17collections: fix a couple of typosIvan Ukhov-3/+3
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-3/+4
2015-05-09Squeeze the last bits of `task`s in documentation in favor of `thread`Barosl Lee-1/+1
An automated script was run against the `.rs` and `.md` files, subsituting every occurrence of `task` with `thread`. In the `.rs` files, only the texts in the comment blocks were affected.
2015-04-07std: Deny most warnings in doctestsAlex Crichton-155/+180
Allow a few specific ones but otherwise this helps ensure that our examples are squeaky clean! Closes #18199
2015-03-27default => or_insert per RFCAlexis Beingessner-2/+2
2015-03-26update everything to use Entry defaultsAlexis-8/+2
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-0/+2