about summary refs log tree commit diff
path: root/src/libcollections
AgeCommit message (Collapse)AuthorLines
2014-08-06Use byte literals in libcollections testsnham-7/+7
2014-08-04auto merge of #15986 : Florob/rust/nfKc-new, r=alexcrichtonbors-30/+198
This adds a new `Recompositions` iterator, which performs canonical composition on the result of the `Decompositions` iterator (which is canonical or compatibility decomposition). In effect this implements Unicode normalization forms C and KC.
2014-08-03auto merge of #16203 : Gankro/rust/vec_flow, r=alexcrichtonbors-1/+7
fixes #16200
2014-08-02auto merge of #16180 : jbcrail/rust/fix-comments, r=steveklabnikbors-3/+3
2014-08-02fix underflow in vec swap_removeAlexis Beingessner-1/+7
fixes #16200
2014-08-02auto merge of #16177 : nham/rust/collections_15294_eq_ord, r=alexcrichtonbors-1/+63
This implements: - Eq and Ord for DList, RingBuf, TreeMap and TreeSet - FromIterator and Extendable for BitvSet cc #15294
2014-08-01Fix misspelled comments.Joseph Crail-3/+3
2014-08-01collections: Implement FromIterator/Extendable for BitvSetnham-1/+27
2014-08-01collections: Implement Ord for DList, RingBuf, TreeMap, TreeSetnham-0/+28
2014-08-01collections: Implement Eq for DList, RingBuf, TreeMap, TreeSetnham-0/+8
2014-08-01auto merge of #16102 : zwarich/rust/borrowck-unboxed, r=pcwaltonbors-8/+15
This removes the ability of the borrow checker to determine that repeated dereferences of a Box<T> refer to the same memory object.
2014-08-01librustc: Forbid pattern bindings after `@`s, for memory safety.Patrick Walton-1/+1
This is an alternative to upgrading the way rvalues are handled in the borrow check. Making rvalues handled more like lvalues in the borrow check caused numerous problems related to double mutable borrows and rvalue scopes. Rather than come up with more borrow check rules to try to solve these problems, I decided to just forbid pattern bindings after `@`. This affected fewer than 10 lines of code in the compiler and libraries. This breaks code like: match x { y @ z => { ... } } match a { b @ Some(c) => { ... } } Change this code to use nested `match` or `let` expressions. For example: match x { y => { let z = y; ... } } match a { Some(c) => { let b = Some(c); ... } } Closes #14587. [breaking-change]
2014-07-30Library changes for RFC #43Cameron Zwarich-8/+15
2014-07-30auto merge of #15915 : erickt/rust/master, r=alexcrichtonbors-1/+1
std: rename MemWriter to SeekableMemWriter, add seekless MemWriter Not all users of MemWriter need to seek, but having MemWriter seekable adds between 3-29% in overhead in certain circumstances. This fixes that performance gap by making a non-seekable MemWriter, and creating a new SeekableMemWriter for those circumstances when that functionality is actually needed. ``` test io::mem::test::bench_buf_reader ... bench: 682 ns/iter (+/- 85) test io::mem::test::bench_buf_writer ... bench: 580 ns/iter (+/- 57) test io::mem::test::bench_mem_reader ... bench: 793 ns/iter (+/- 99) test io::mem::test::bench_mem_writer_001_0000 ... bench: 48 ns/iter (+/- 27) test io::mem::test::bench_mem_writer_001_0010 ... bench: 65 ns/iter (+/- 27) = 153 MB/s test io::mem::test::bench_mem_writer_001_0100 ... bench: 132 ns/iter (+/- 12) = 757 MB/s test io::mem::test::bench_mem_writer_001_1000 ... bench: 802 ns/iter (+/- 151) = 1246 MB/s test io::mem::test::bench_mem_writer_100_0000 ... bench: 481 ns/iter (+/- 28) test io::mem::test::bench_mem_writer_100_0010 ... bench: 1957 ns/iter (+/- 126) = 510 MB/s test io::mem::test::bench_mem_writer_100_0100 ... bench: 8222 ns/iter (+/- 434) = 1216 MB/s test io::mem::test::bench_mem_writer_100_1000 ... bench: 82496 ns/iter (+/- 11191) = 1212 MB/s test io::mem::test::bench_seekable_mem_writer_001_0000 ... bench: 48 ns/iter (+/- 2) test io::mem::test::bench_seekable_mem_writer_001_0010 ... bench: 64 ns/iter (+/- 2) = 156 MB/s test io::mem::test::bench_seekable_mem_writer_001_0100 ... bench: 129 ns/iter (+/- 7) = 775 MB/s test io::mem::test::bench_seekable_mem_writer_001_1000 ... bench: 801 ns/iter (+/- 159) = 1248 MB/s test io::mem::test::bench_seekable_mem_writer_100_0000 ... bench: 711 ns/iter (+/- 51) test io::mem::test::bench_seekable_mem_writer_100_0010 ... bench: 2532 ns/iter (+/- 227) = 394 MB/s test io::mem::test::bench_seekable_mem_writer_100_0100 ... bench: 8962 ns/iter (+/- 947) = 1115 MB/s test io::mem::test::bench_seekable_mem_writer_100_1000 ... bench: 85086 ns/iter (+/- 11555) = 1175 MB/s ```
2014-07-29Fix a whitespace typoErick Tryzelaar-1/+1
2014-07-29Implement Hash for DListnham-0/+29
2014-07-29Fix documentation error in MutableVectorAllocating::move_fromdonkopotamus-1/+1
Correct `str` to `src`
2014-07-29auto merge of #16038 : nham/rust/collections_partialord, r=alexcrichtonbors-2/+172
cc #15294
2014-07-29auto merge of #16033 : nham/rust/hash_tuple_impl, r=alexcrichtonbors-11/+18
Previously the implementation of Hash was limited to tuples of up to arity 8. This increases it to tuples of up to arity 12. Also, the implementation macro for `Hash` used to expand to something like this: impl Hash for (a7,) impl Hash for (a6, a7) impl Hash for (a5, a6, a7) ... This style is inconsistent with the implementations in core::tuple, which look like this: impl Trait for (A,) impl Trait for (A, B) impl Trait for (A, B, C) ... This is perhaps a minor point, but it does mean the documentation pages are inconsistent. Compare the tuple implementations in the documentation for [Hash](http://static.rust-lang.org/doc/master/std/hash/trait.Hash.html) and [PartialOrd](http://static.rust-lang.org/doc/master/core/cmp/trait.PartialOrd.html) This changes the Hash implementation to be consistent with `core::tuple`.
2014-07-29auto merge of #16032 : treeman/rust/doc-treecollection, r=alexcrichtonbors-31/+528
2014-07-28auto merge of #16027 : treeman/rust/doc-string, r=alexcrichtonbors-25/+261
2014-07-28collections, unicode: Add support for NFC and NFKCFlorian Zeitz-30/+198
2014-07-28doc: Method examples for StringJonas Hietala-25/+261
Reword comments on unsafe methods regarding UTF-8.
2014-07-28Implement Ord for TrieMap/TrieSet/SmallIntMap/Bitv/BitvSetnham-2/+23
2014-07-28Implement PartialOrd for Bitv and BitvSetnham-1/+40
2014-07-28Implement PartialOrd for SmallIntMapnham-0/+39
2014-07-27Implement PartialOrd for TrieMap and TrieSetnham-1/+72
2014-07-27auto merge of #16020 : nham/rust/ringbuf_hash_ord, r=alexcrichtonbors-0/+49
cc #15294
2014-07-27Implement Hash for tuples of up to arity 12. Also change the style to be ↵nham-11/+18
consistent with core::tuple
2014-07-27doc: Small rewording.Jonas Hietala-6/+4
2014-07-27Hash the length of the RingBuf before hashing elementsnham-0/+1
2014-07-27doc: Main example for TreeMap.Jonas Hietala-0/+101
2014-07-27doc: TreeMap methods with examples.Jonas Hietala-17/+248
Small corrections for TreeSet examples.
2014-07-27doc: TreeSet methods and main example.Jonas Hietala-16/+183
2014-07-27auto merge of #15963 : nham/rust/moar_15294, r=alexcrichtonbors-2/+194
Implements PartialEq/Eq/Clone/Hash/FromIterator/Extendable for SmallIntMap and Clone/Show for TrieMap/TrieSet. cc #15294
2014-07-26Implement PartialOrd for RingBufnham-0/+20
2014-07-26Implement Hash for RingBufnham-0/+28
2014-07-26Manually implement Hash for SmallIntMapnham-12/+20
2014-07-26auto merge of #15762 : nham/rust/ringbuf_docs, r=alexcrichtonbors-0/+66
This adds examples for get(), get_mut(), swap(), iter() and mut_iter()
2014-07-26Add examples for RingBuf methods get, get_mut, iter, mut_iternham-0/+66
2014-07-26Small fixes for testsnham-8/+8
2014-07-25Fix a typo in SmallIntMap documentationnham-1/+1
2014-07-25Implement PartialEq/Eq/Clone/Hash/FromIterator/Extendable for SmallIntMap ↵nham-1/+185
and Show/Clone for TrieMap and TrieSet
2014-07-25Add methods for obtaining iterators over the keys and values of a TrieMapnham-0/+43
2014-07-25Add methods for obtaining iterators over the keys and values of a SmallIntMapnham-0/+47
2014-07-25Add methods for obtaining iterators over the keys and values of a TreeMapnham-0/+41
2014-07-24auto merge of #15945 : treeman/rust/doc-smallint-update, r=alexcrichtonbors-4/+44
Forgot two methods, but @alexcrichton was a bit too quick to accept #15943, so I made a new PR.
2014-07-24Document update and update_with_key in SmallIntMap.Jonas Hietala-4/+44
Move update above for better docs progression.
2014-07-24Document SmallIntMap with examples.Jonas Hietala-2/+119
2014-07-24Format documentation for SmallIntMap.Jonas Hietala-17/+15