about summary refs log tree commit diff
path: root/src/libcollections/btree
AgeCommit message (Collapse)AuthorLines
2016-07-03std: Stabilize APIs for the 1.11.0 releaseAlex Crichton-14/+4
Although the set of APIs being stabilized this release is relatively small, the trains keep going! Listed below are the APIs in the standard library which have either transitioned from unstable to stable or those from unstable to deprecated. Stable * `BTreeMap::{append, split_off}` * `BTreeSet::{append, split_off}` * `Cell::get_mut` * `RefCell::get_mut` * `BinaryHeap::append` * `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past libstd stabilizations * `Iterator::sum` * `Iterator::product` Deprecated * `{f32, f64}::next_after` * `{f32, f64}::integer_decode` * `{f32, f64}::ldexp` * `{f32, f64}::frexp` * `num::One` * `num::Zero` Added APIs (all unstable) * `iter::Sum` * `iter::Product` * `iter::Step` - a few methods were added to accomodate deprecation of One/Zero Removed APIs * `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is unstable Closes #27739 Closes #27752 Closes #32526 Closes #33444 Closes #34152 cc #34529 (new tracking issue)
2016-06-15Map::Entry::take() method to recover key and value togetherSean McArthur-0/+12
2016-06-10Update tracking issue for `{BTreeMap, BTreeSet}::{append, split_off}`Andrew Paseltiner-4/+4
2016-06-10Rollup merge of #34175 - rwz:patch-2, r=alexcrichtonSeo Sanghyeon-1/+1
Fix BTreeMap example typo The whole example is made around movies reviews, but that one line says "review some books".
2016-06-08Fix BTreeMap example typoPavel Pravosud-1/+1
The whole example is made around movies reviews, but that one line says "review some books".
2016-06-05run rustfmt on map.rs in libcollections/btree folderSrinivas Reddy Thatiparthy-220/+274
2016-06-01Implement split_off for BTreeMap and BTreeSet (RFC 509)Andrey Tonkih-92/+411
2016-05-24std: Stabilize APIs for the 1.10 releaseAlex Crichton-10/+9
This commit applies the FCP decisions made by the libs team for the 1.10 cycle, including both new stabilizations and deprecations. Specifically, the list of APIs is: Stabilized: * `os::windows::fs::OpenOptionsExt::access_mode` * `os::windows::fs::OpenOptionsExt::share_mode` * `os::windows::fs::OpenOptionsExt::custom_flags` * `os::windows::fs::OpenOptionsExt::attributes` * `os::windows::fs::OpenOptionsExt::security_qos_flags` * `os::unix::fs::OpenOptionsExt::custom_flags` * `sync::Weak::new` * `Default for sync::Weak` * `panic::set_hook` * `panic::take_hook` * `panic::PanicInfo` * `panic::PanicInfo::payload` * `panic::PanicInfo::location` * `panic::Location` * `panic::Location::file` * `panic::Location::line` * `ffi::CStr::from_bytes_with_nul` * `ffi::CStr::from_bytes_with_nul_unchecked` * `ffi::FromBytesWithNulError` * `fs::Metadata::modified` * `fs::Metadata::accessed` * `fs::Metadata::created` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak` * `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key` * `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}` * `SocketAddr::is_unnamed` * `SocketAddr::as_pathname` * `UnixStream::connect` * `UnixStream::pair` * `UnixStream::try_clone` * `UnixStream::local_addr` * `UnixStream::peer_addr` * `UnixStream::set_read_timeout` * `UnixStream::set_write_timeout` * `UnixStream::read_timeout` * `UnixStream::write_Timeout` * `UnixStream::set_nonblocking` * `UnixStream::take_error` * `UnixStream::shutdown` * Read/Write/RawFd impls for `UnixStream` * `UnixListener::bind` * `UnixListener::accept` * `UnixListener::try_clone` * `UnixListener::local_addr` * `UnixListener::set_nonblocking` * `UnixListener::take_error` * `UnixListener::incoming` * RawFd impls for `UnixListener` * `UnixDatagram::bind` * `UnixDatagram::unbound` * `UnixDatagram::pair` * `UnixDatagram::connect` * `UnixDatagram::try_clone` * `UnixDatagram::local_addr` * `UnixDatagram::peer_addr` * `UnixDatagram::recv_from` * `UnixDatagram::recv` * `UnixDatagram::send_to` * `UnixDatagram::send` * `UnixDatagram::set_read_timeout` * `UnixDatagram::set_write_timeout` * `UnixDatagram::read_timeout` * `UnixDatagram::write_timeout` * `UnixDatagram::set_nonblocking` * `UnixDatagram::take_error` * `UnixDatagram::shutdown` * RawFd impls for `UnixDatagram` * `{BTree,Hash}Map::values_mut` * `<[_]>::binary_search_by_key` Deprecated: * `StaticCondvar` - this, and all other static synchronization primitives below, are usable today through the lazy-static crate on stable Rust today. Additionally, we'd like the non-static versions to be directly usable in a static context one day, so they're unlikely to be the final forms of the APIs in any case. * `CONDVAR_INIT` * `StaticMutex` * `MUTEX_INIT` * `StaticRwLock` * `RWLOCK_INIT` * `iter::Peekable::is_empty` Closes #27717 Closes #27720 cc #27784 (but encode methods still exist) Closes #30014 Closes #30425 Closes #30449 Closes #31190 Closes #31399 Closes #31767 Closes #32111 Closes #32281 Closes #32312 Closes #32551 Closes #33018
2016-04-30Auto merge of #33276 - bwinterton:btreeset-insert-doc-fix, r=GuillaumeGomezbors-2/+2
Make BTreeSet::Insert docs more consistent Made the BTreeSet::Insert documentation consistent with the HashSet::Insert documentation by using the term 'value' instead of 'key'. r? @steveklabnik
2016-04-29Auto merge of #33148 - sfackler:entry-key, r=alexcrichtonbors-0/+9
Add Entry::key This method was present on both variants of Entry, but not the enum cc #32281 r? @alexcrichton
2016-04-29Make Btreeset::Insert docs more consistentBrayden Winterton-2/+2
2016-04-22Implement `append` for b-trees.Johannes Oertel-24/+339
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-04-21Add Entry::keySteven Fackler-0/+9
This method was present on both variants of Entry, but not the enum cc #32281
2016-04-17Rollup merge of #31441 - gereeter:btree-docs, r=blussManish Goregaokar-5/+176
Start documenting BTreeMap's node interface cc @Gankro @apasel422
2016-04-11std: Stabilize APIs for the 1.9 releaseAlex Crichton-3/+3
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-04-01Implement `values_mut` on `BTreeMap`.Corey Farwell-0/+60
https://github.com/rust-lang/rust/issues/32551
2016-03-15Use issue number from rust-lang/rust, not rust-lang/rfcs.Stu Black-2/+2
2016-03-14Expose the key of Entry variants for HashMap and BTreeMap.Stu Black-0/+13
2016-03-11Auto merge of #32133 - alexcrichton:linkchecker, r=brsonbors-2/+2
Add a link validator to rustbuild This commit was originally targeted at just adding a link checking script to the rustbuild system. This ended up snowballing a bit to extend rustbuild to be amenable to various tools we have as part of the build system in general. There's a new `src/tools` directory which has a number of scripts/programs that are purely intended to be used as part of the build system and CI of this repository. This is currently inhabited by rustbook, the error index generator, and a new linkchecker script added as part of this PR. I suspect that more tools like compiletest, tidy scripts, snapshot scripts, etc will migrate their way into this directory over time. The commit which adds the error index generator shows the steps necessary to add new tools to the build system, namely: 1. New steps are defined for building the tool and running the tool 2. The dependencies are configured 3. The steps are implemented In terms of the link checker, these commits do a few things: * A new `src/tools/linkchecker` script is added. This will read an entire documentation tree looking for broken relative links (HTTP links aren't followed yet). * A large number of broken links throughout the documentation were fixed. Many of these were just broken when viewed from core as opposed to std, but were easily fixed. * A few rustdoc bugs here and there were fixed
2016-03-10Rollup merge of #32136 - nathankleyn:improve-docs-for-btreeset, r=steveklabnikSteve Klabnik-0/+30
Add missing documentation examples for BTreeSet. As part of the ongoing effort to document all methods with examples, this commit adds the missing examples for the `BTreeSet` collection type. This is part of issue #29348. r? @steveklabnik
2016-03-09collections: Fix broken doc exampleAlex Crichton-1/+1
PR #32135 was accidentally merged without tests passing, and unfortunately one of the tests added was broken, so this fixes that.
2016-03-09Add missing "basic usage" sections to docs, fix review comments.Nathan Kleyn-1/+36
2016-03-08Add missing documentation examples for BTreeSet.Nathan Kleyn-0/+30
As part of the ongoing effort to document all methods with examples, this commit adds the missing examples for the `BTreeSet` collection type. This is part of issue #29348.
2016-03-08Add missing documentation examples for BTreeMap.Nathan Kleyn-0/+76
As part of the ongoing effort to document all methods with examples, this commit adds the missing examples for the `BTreeMap` collection type. This is part of issue #29348.
2016-03-08doc: Fix a bunch of broken linksAlex Crichton-2/+2
A few categories: * Links into compiler docs were just all removed as we're not generating compiler docs. * Move up one more level to forcibly go to std docs to fix inlined documentation across the facade crates.
2016-02-25Fix review comments in BTreeMap's Node documentationJonathan S-71/+96
2016-02-23Register new snapshotsAaron Turon-2/+2
2016-02-15clarify how insert() doesn't update keysJack O'Connor-3/+4
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-02-09Minor spelling fixesCarlos E. Garcia-1/+1
2016-02-05Start documenting BTreeMap's node interfaceJonathan S-3/+149
2016-01-26Add size hints for BTreeSet iteratorsMatt Brubeck-2/+27
2016-01-22Document that BTreeMap iteration is in orderMatt Brubeck-10/+10
Also change the examples to make this more obvious. Fixes #31129.
2016-01-20Auto merge of #31038 - gereeter:btree-panic, r=Gankrobors-2/+2
…ving elements into it. Fixes #31029.
2016-01-19In BTreeMap's merge function, adjust the length of the node before moving ↵Jonathan S-2/+2
elements into it.
2016-01-18Make `btree_set::{IntoIter, Iter, Range}` covariantAndrew Paseltiner-19/+9
CC #30642
2016-01-17Fix and test variance of BTreeMap and its companion structs.Jonathan S-17/+39
2016-01-16Rewrite BTreeMap to use parent pointers.Jonathan S-2591/+1880
2016-01-16Auto merge of #30939 - shepmaster:btreeset-insert-return-value, r=alexcrichtonbors-1/+1
2016-01-15BTreeSet::insert returns false when key already existsJake Goulding-1/+1
2016-01-14Require stability annotations on fields of tuple variantsVadim Petrochenkov-2/+6
2016-01-04Feature-gate defaulted type parameters outside of types.Niko Matsakis-12/+12
2015-12-18Fix the falloutVadim Petrochenkov-6/+6
2015-12-17Remove unused importsJeffrey Seyfried-1/+1
2015-12-14Add links in BTreeSet docsOri Avtalion-3/+8
2015-12-10std: Remove deprecated functionality from 1.5Alex Crichton-30/+5
This is a standard "clean out libstd" commit which removes all 1.5-and-before deprecated functionality as it's now all been deprecated for at least one entire cycle.
2015-11-25Auto merge of #30017 - nrc:fmt, r=brsonbors-386/+566
2015-11-24rustfmt libcollectionsNick Cameron-386/+566
2015-11-20Rename #[deprecated] to #[rustc_deprecated]Vadim Petrochenkov-2/+2
2015-11-18Add missing annotations and some testsVadim Petrochenkov-1/+0
2015-11-16Auto merge of #29830 - petrochenkov:mapdoc, r=alexcrichtonbors-2/+3
r? @steveklabnik