summary refs log tree commit diff
path: root/src/libcollectionstest/vec.rs
AgeCommit message (Collapse)AuthorLines
2016-12-23Implement placement-in protocol for `Vec`Andrew Paseltiner-0/+19
2016-10-27Auto merge of #37212 - srinivasreddy:libcollectionstest, r=nrcbors-2/+6
run rustfmt on libcollectionstest
2016-10-25run rustfmt on libcollectionstestSrinivas Reddy Thatiparthy-2/+6
2016-10-21Implement `From<Cow<str>> for String` and `From<Cow<[T]>> for Vec<T>`.Simon Sapin-0/+8
Motivation: the `selectors` crate is generic over a string type, in order to support all of `String`, `string_cache::Atom`, and `gecko_string_cache::Atom`. Multiple trait bounds are used for the various operations done with these strings. One of these operations is creating a string (as efficiently as possible, re-using an existing memory allocation if possible) from `Cow<str>`. The `std::convert::From` trait seems natural for this, but the relevant implementation was missing before this PR. To work around this I’ve added a `FromCowStr` trait in `selectors`, but with trait coherence that means one of `selectors` or `string_cache` needs to depend on the other to implement this trait. Using a trait from `std` would solve this. The `Vec<T>` implementation is just added for consistency. I also tried a more general `impl<'a, O, B: ?Sized + ToOwned<Owned=O>> From<Cow<'a, B>> for O`, but (the compiler thinks?) it conflicts with `From<T> for T` the impl (after moving all of `collections::borrow` into `core::borrow` to work around trait coherence).
2016-10-17Auto merge of #37162 - matklad:static-mut-lint, r=jseyfriedbors-5/+5
Lint against lowercase static mut Closes #37145. Lint for non mut statics was added in https://github.com/rust-lang/rust/pull/7523, and it explicitly did not cover mut statics. I am not sure why.
2016-10-14Rename static mut to upper caseAleksey Kladov-5/+5
2016-10-11Add Vec::dedup_by and Vec::dedup_by_keySimon Sapin-0/+26
2016-09-26Move Vec::dedup tests from slice.rs to vec.rsSimon Sapin-0/+29
2016-08-17Auto merge of #35747 - jonathandturner:rollup, r=jonathandturnerbors-0/+8
Rollup of 23 pull requests - Successful merges: #34370, #35415, #35595, #35610, #35613, #35614, #35621, #35660, #35663, #35670, #35671, #35672, #35681, #35686, #35690, #35695, #35707, #35708, #35713, #35722, #35725, #35726, #35731 - Failed merges: #35395
2016-08-16Make `vec::IntoIter` covariant againAndrew Paseltiner-1/+2
Closes #35721
2016-08-15Implement `Debug` for `std::vec::IntoIter`.Corey Farwell-0/+8
Display all the remaining items of the iterator, similar to the `Debug` implementation for `core::slice::Iter`: https://github.com/rust-lang/rust/blob/f0bab98695f0a4877daabad9a5b0ba3e66121392/src/libcore/slice.rs#L930-L937 Using the `as_slice` method that was added in: https://github.com/rust-lang/rust/pull/35447
2016-08-11Introduce `as_mut_slice` method on `std::vec::IntoIter` struct.Corey Farwell-0/+11
2016-08-11Introduce `as_slice` method on `std::vec::IntoIter` struct.Corey Farwell-0/+12
Similar to the `as_slice` method on `core::slice::Iter` struct.
2016-07-21Readding lifetime parameters and removing allocationThomas Garcia-1/+1
2016-07-21Make vec::Drain and binary_heap::Drain covariantThomas Garcia-0/+6
2016-05-22run rustfmt on libcollections test moduleSrinivas Reddy Thatiparthy-22/+34
2016-04-14Specialize `Extend` to `append` for `{LinkedList, Vec}`Andrew Paseltiner-0/+3
2016-02-17Implement `Clone` for `std::vec::IntoIter`Tobias Bucher-0/+18
2016-02-03Add tests for `Cow::from` for strings, vectors and slicesTobias Bucher-0/+11
2016-01-30test: Deny warnings in {core,collections}testAlex Crichton-1/+1
Help cleans up our build a bit and stays in line with the rest of our crates denying warnings traditionally.
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-80/+2
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-07-17Add RawVec to unify raw Vecish codeAlexis Beingessner-21/+0
2015-06-17Fallout in tests and docs from feature renamingsAlex Crichton-0/+3
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-3/+3
2015-06-08Implement RFC 839Johannes Oertel-0/+15
Closes #25976.
2015-05-27Use `const fn` to abstract away the contents of UnsafeCell & friends.Eduard Burtescu-2/+2
2015-05-02Override Iterator::count method in vec::IntoItersinkuu-0/+5
2015-04-28Register new snapshotsTamir Duberstein-1/+0
2015-04-28collections: Implement vec::drain(range) according to RFC 574Ulrik Sverdrup-3/+33
Old `.drain()` on vec is performed using `.drain(..)` now. `.drain(range)` is unstable and under feature(collections_drain) [breaking-change]
2015-03-16extract libcollections tests into libcollectionstestJorge Aparicio-0/+994