about summary refs log tree commit diff
path: root/src/libcollections/btree
AgeCommit message (Collapse)AuthorLines
2017-06-13Merge crate `collections` into `alloc`Murarth-5247/+0
2017-05-04fallout from NonZero/Unique/Shared changesAlexis Beingessner-9/+9
2017-04-23Auto merge of #41437 - cuviper:remove-unstable-deprecated, r=alexcrichtonbors-7/+0
Remove items that are unstable and deprecated This removes unstable items that have been deprecated for more than one cycle. - Since 1.16.0, `#![feature(enumset)]` - All of `mod collections::enum_set` - Since 1.15.0, `#![feature(borrow_state)]` - `cell::BorrowState` - `RefCell::borrow_state()` - Since 1.15.0, `#![feature(is_unique)]` - `Rc::is_unique()` (made private like `Arc::is_unique()`) - Since 1.15.0, `#![feature(rc_would_unwrap)]` - `Rc::would_wrap()` - Since 1.13.0, `#![feature(binary_heap_extras)]` - `BinaryHeap::push_pop()` - `BinaryHeap::replace()` - Since 1.12.0, `#![feature(as_unsafe_cell)]` - `Cell::as_unsafe_cell()` - `RefCell::as_unsafe_cell()` - Since 1.12.0, `#![feature(map_entry_recover_keys)]` - `btree_map::OccupiedEntry::remove_pair()` - `hash_map::OccupiedEntry::remove_pair()` - Since 1.11.0, `#![feature(float_extras)]` - `Float::nan()` - `Float::infinity()` - `Float::neg_infinity()` - `Float::neg_zero()` - `Float::zero()` - `Float::one()` - `Float::integer_decode()` - `f32::integer_decode()` - `f32::ldexp()` - `f32::frexp()` - `f32::next_after()` - `f64::integer_decode()` - `f64::ldexp()` - `f64::frexp()` - `f64::next_after()` - Since 1.11.0, `#![feature(zero_one)]` - `num::Zero` - `num::One`
2017-04-22Fix invalid linkageGuillaume Gomez-2/+2
2017-04-20Remove OccupiedEntry::remove_pairJosh Stone-7/+0
[unstable, deprecated since 1.12.0]
2017-04-20Auto merge of #41342 - GuillaumeGomez:btree-debug-infinite, r=alexcrichtonbors-4/+8
Fix debug infinite loop Fixes #41338.
2017-04-19Fix debug infinite loopGuillaume Gomez-4/+8
2017-04-18Fix a few stability attributesOliver Middleton-0/+10
These show up in rustdoc so need to be correct.
2017-04-13Various consistency and phrasing fixes in std::collections' docslukaramu-5/+8
* 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-1/+1
* 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-24/+78
This greatly improves consistency.
2017-04-10Apply clippy's doc_markdown improvements to libcollectionsAndre Bogus-12/+12
Since my last PR led to linker failure, I'm now taking much smaller steps. This only fixes some doc_markdown warnings; as they are in comments only, we shouldn't get any problems building.
2017-03-24Unnecessary iteration in BTreeMap::dropStepan Koltsov-2/+1
`IntoIter::drop` already iterates.
2017-03-22Various fixes to wording consistency in the docsStjepan Glavina-3/+3
2017-03-17Minor fixups to fix tidy errorsAlex Crichton-5/+4
2017-03-17Stabilize btree_range, closes #27787Aaron Turon-10/+2
2017-02-15Auto merge of #39457 - bvinc:master, r=alexcrichtonbors-115/+92
Dont segfault if btree range is not in order This is a first attempt to fix issue #33197. The issue is that the BTree iterator uses next_unchecked for fast iteration, but it can be tricked into running off the end of the tree and segfaulting if range is called with a maximum that is less than the minimum. Since a user defined Ord should not determine the safety of BTreeMap, and we still want fast iteration, I've implemented the idea of @gereeter and walk the tree simultaneously searching for both keys to make sure that if our keys diverge, the min key is to the left of our max key. I currently panic if that is not the case. Open questions: 1. Do we want to panic in this error case or do we want to return an empty iterator? The drain API panics if the range is bad, but drain is given a range of index values, while this is a generic key type. Panicking is brittle and returning an empty iterator is probably the most flexible and matches what people would want it to do... but artificially returning a BTreeMap::Range with start==end seems like a pretty weird and unnatural thing to do, although it's doable since those fields are not accessible. The same question for other weird cases: 2. (Included(101), Excluded(100)) on a map that contains [1,2,3]. Both BTree edges end up on the same part of the map, but comparing the keys shows the range is backwards. 3. (Excluded(5), Excluded(5)). The keys are equal but BTree edges end up backwards if the map contains 5. 4. (Included(5), Excluded(5)). Should naturally produce an empty iterator, right?
2017-02-10Dont segfault if btree range is not in orderBrian Vincent-115/+92
2017-02-09Update set operations documentationJethro Beekman-7/+17
Reminding people of set terminology.
2017-02-05Replace PlaceBack Debug implementation with deriveGuillaume Gomez-44/+20
2017-01-20Remove Debug implementations specializationGuillaume Gomez-105/+0
2017-01-20Add Debug implementations for libcollection structsGuillaume Gomez-0/+228
2017-01-16Rollup merge of #39106 - istankovic:patch-2, r=GuillaumeGomezGuillaume Gomez-1/+1
libcollections: btree/set: fix a typo
2017-01-16libcollections: btree/set: fix a typoIvan Stankovic-1/+1
2017-01-16libcollections: btree/map: fix typosIvan Stankovic-2/+2
2017-01-14update docs with new syntaxdjzin-9/+9
2017-01-14update docs with new syntaxdjzin-12/+18
2017-01-14fix warnings in doctestsdjzin-4/+3
2017-01-14shorten range syntaxdjzin-1/+1
2017-01-14simplify some rangesdjzin-2/+2
2017-01-14add type annotations to doctestdjzin-1/+1
2017-01-14use rangeargument for range_mutdjzin-7/+6
2017-01-14fix up testsdjzin-4/+4
2017-01-14change argument for btree_rangedjzin-12/+9
2017-01-13Change `to_owned` to `to_string` in docsStjepan Glavina-2/+2
We should teach conversion from `str` to `String` using `to_string` rather than the legacy `to_owned`.
2016-12-28Replace uses of `#[unsafe_destructor_blind_to_params]` with `#[may_dangle]`Andrew Paseltiner-2/+1
CC #34761
2016-12-20Indicate that `BTreeSet::iter` returns values in ascending order.Corey Farwell-1/+14
Fixes https://github.com/rust-lang/rust/issues/38204.
2016-12-15Simplify `BTreeSet::iter` doc example.Corey Farwell-8/+6
2016-12-15Document how `BTreeSet` iterator structures are created.Corey Farwell-0/+36
2016-12-14Indicate `BTreeSet` in docs is code-like.Corey Farwell-5/+5
2016-10-01std: Correct stability attributes for some implementationsOliver Middleton-0/+40
These are displayed by rustdoc so should be correct.
2016-09-13Doc correction: btreeathulappadan-1/+1
2016-09-11Documentation for default types modifiedathulappadan-1/+1
2016-09-11Documentation of what does for each typeathulappadan-0/+2
2016-09-03Add missing urlsGuillaume Gomez-4/+8
2016-08-23Auto merge of #35656 - Stebalien:fused, r=alexcrichtonbors-2/+46
Implement 1581 (FusedIterator) * [ ] Implement on patterns. See https://github.com/rust-lang/rust/issues/27721#issuecomment-239638642. * [ ] Handle OS Iterators. A bunch of iterators (`Args`, `Env`, etc.) in libstd wrap platform specific iterators. The current ones all appear to be well-behaved but can we assume that future ones will be? * [ ] Does someone want to audit this? On first glance, all of the iterators on which I implemented `FusedIterator` appear to be well-behaved but there are a *lot* of them so a second pair of eyes would be nice. * I haven't touched rustc internal iterators (or the internal rand) because rustc doesn't actually call `fuse()`. * `FusedIterator` can't be implemented on `std::io::{Bytes, Chars}`. Closes: #35602 (Tracking Issue) Implements: rust-lang/rfcs#1581
2016-08-19std: Stabilize APIs for the 1.12 releaseAlex Crichton-8/+11
Stabilized * `Cell::as_ptr` * `RefCell::as_ptr` * `IpAddr::is_{unspecified,loopback,multicast}` * `Ipv6Addr::octets` * `LinkedList::contains` * `VecDeque::contains` * `ExitStatusExt::from_raw` - both on Unix and Windows * `Receiver::recv_timeout` * `RecvTimeoutError` * `BinaryHeap::peek_mut` * `PeekMut` * `iter::Product` * `iter::Sum` * `OccupiedEntry::remove_entry` * `VacantEntry::into_key` Deprecated * `Cell::as_unsafe_cell` * `RefCell::as_unsafe_cell` * `OccupiedEntry::remove_pair` Closes #27708 cc #27709 Closes #32313 Closes #32630 Closes #32713 Closes #34029 Closes #34392 Closes #34285 Closes #34529
2016-08-18Add a FusedIterator trait.Steven Allen-2/+46
This trait can be used to avoid the overhead of a fuse wrapper when an iterator is already well-behaved. Conforming to: RFC 1581 Closes: #35602
2016-07-20Add doc for btree_map typesggomez-2/+189
2016-07-19Add debug for btree_map::{Entry, VacantEntry, OccupiedEntry}Guillaume Gomez-0/+33