about summary refs log tree commit diff
path: root/src/libstd/vec.rs
AgeCommit message (Collapse)AuthorLines
2013-06-30Convert vec::{bsearch, bsearch_elem} to methods.Huon Wilson-79/+88
2013-06-30Convert vec::{reverse, swap} to methods.Huon Wilson-42/+44
2013-06-30Convert vec::{rposition, rposition_elem, position_elem, contains} to methods.Huon Wilson-44/+24
2013-06-30Remove vec::[r]position_between, replaced by slices & iterators.Huon Wilson-102/+8
2013-06-30Remove vec::{rfind, rfind_between, find_between}, replaced by slices and ↵Huon Wilson-119/+0
iterator adapators.
2013-06-30vec: use contains_managed instead of box headerDaniel Micay-1/+29
2013-06-29minor vec cleanupDaniel Micay-10/+6
* hide the rustrt module in the docs * remove the useless `traits` module wrapping the `Add` impl
2013-06-29Removing a lot of usage of '&const'Alex Crichton-52/+20
2013-06-29'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep ↵Ben Blum-4/+4
for making them noncopyable.
2013-06-28Make default method handling not choke on self region params. Closes #7341.Michael Sullivan-2/+4
2013-06-28librustc: Disallow "mut" from distributing over bindings.Patrick Walton-3/+6
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-28std: silence some test warnings.Huon Wilson-2/+2
2013-06-28Convert vec::{reserve, reserve_at_least, capacity} to methods.Huon Wilson-71/+71
2013-06-28Convert vec::{partition, partitioned} to methods.Huon Wilson-47/+28
2013-06-28Convert vec::retain to a method.Huon Wilson-22/+18
2013-06-28Convert vec::truncate to a method.Huon Wilson-16/+11
2013-06-28Convert vec::{push, push_all, push_all_move} to methods.Huon Wilson-85/+75
2013-06-28Convert vec::{pop, shift, unshift, insert, remove, swap_remove} to methods.Huon Wilson-133/+101
2013-06-27Convert vec::{head, tail, init, last} (and similar fns) to methods.Huon Wilson-50/+26
2013-06-27Convert vec::[mut_]slice to methods, remove vec::const_slice.Huon Wilson-63/+37
2013-06-26vec: remove superseded reverse_part functionDaniel Micay-40/+2
`reverse(xs.mut_slice(a, b))` replaces `reverse_part(xs, a, b)`
2013-06-26Add methods .move_from() and .copy_from() to vecKevin Ballard-0/+73
Add method .move_from() to MutableVector, which consumes another vector and moves elements into the receiver. Add new trait MutableCloneableVector with one method .copy_from(), which clones elements from another vector into the receiver.
2013-06-26Add method .set_memory in vec::bytes for &[u8]Kevin Ballard-0/+26
Add new trait vec::bytes::MutableByteVector which currently defines one method .set_memory().
2013-06-25remove `each` from vec, HashMap and HashSetDaniel Micay-115/+7
2013-06-25auto merge of #7254 : Blei/rust/intrinsic-overhaul, r=cmrbors-4/+11
This sets the `get_tydesc()` return type correctly and removes the intrinsic module. See #3730, #3475. Update: this now also removes the unused shape fields in tydescs.
2013-06-25Remove stage0 cfgsJames Miller-2/+0
2013-06-24std: Rewrite vec_reserve_shared_actual in RustBrian Anderson-7/+3
2013-06-24work around ICE from default methodDaniel Micay-2/+2
issue #7341
2013-06-24iterator: implement `collect` with FromIteratorDaniel Micay-0/+11
This makes it take advantage of the size hint for pre-allocation.
2013-06-24remove old_iterDaniel Micay-5/+4
the `test/run-pass/class-trait-bounded-param.rs` test was xfailed and written in an ancient dialect of Rust so I've just removed it this also removes `to_vec` from DList because it's provided by `std::iter::to_vec` an Iterator implementation is added for OptVec but some transitional internal iterator methods are still left
2013-06-23Remove intrinsic modulePhilipp Brüschweiler-4/+11
To achieve this, the following changes were made: * Move TyDesc, TyVisitor and Opaque to std::unstable::intrinsics * Convert TyDesc, TyVisitor and Opaque to lang items instead of specially handling the intrinsics module * Removed TypeDesc, FreeGlue and get_type_desc() from sys Fixes #3475.
2013-06-23vec: remove BaseIter implementationDaniel Micay-13/+3
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-22iterator: add a FromIterator traitDaniel Micay-1/+13
This is able to take advantage of the lower bound from the size hint.
2013-06-22iterator: add a size_hint default methodDaniel Micay-6/+21
also adds an implementation for the vector iterators
2013-06-21replace vec::find with the IteratorUtil methodDaniel Micay-41/+0
2013-06-21vec: replace `position` with `iter().position_`Daniel Micay-42/+4
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-175/+12
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-21vec: remove eachiDaniel Micay-41/+0
replaced by the `enumerate` method from std::iterator
2013-06-21vec: remove each_constDaniel Micay-15/+0
An Iterator implementation can be made for &const [T] if it turns out to be necessary for some use case.
2013-06-21libstd: cleanup warningsJames Miller-1/+1
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-68/+68
2013-06-17auto merge of #7198 : huonw/rust/slice-zeros, r=Aatchbors-0/+22
2013-06-17std: add Zero impls for &[] and &str.Huon Wilson-0/+22
2013-06-16Add copies to type params with Copy boundNiko Matsakis-17/+17
2013-06-16auto merge of #7142 : alexcrichton/rust/deriving-zero, r=pcwaltonbors-0/+11
This allows mass-initialization of large structs without having to specify all the fields. I'm a bit hesitant, but I wanted to get this out there. I don't really like using the `Zero` trait, because it doesn't really make sense for a type like `HashMap` to use `Zero` as the 'blank allocation' trait. In theory there'd be a new trait, but then that's adding cruft to the language which may not necessarily need to be there. I do think that this can be useful, but I only implemented `Zero` on the basic types where I thought it made sense, so it may not be all that usable yet. (opinions?)
2013-06-16auto merge of #7137 : erickt/rust/from-elem-fixme, r=thestingerbors-2/+4
This is to make sure we track optimizing `vec::from_elem`.
2013-06-15rm CopyableOrderedIterDaniel Micay-17/+0
replaced with OrdIterator
2013-06-15rm vec::uniq_lenDaniel Micay-12/+16
2013-06-15auto merge of #7147 : huonw/rust/vec-connect, r=Aatchbors-16/+18
This is caused by StrVector having a generic implementation for &[S] and so #5898 means that method resolution of ~[~[1]].concat() sees that both StrVector and VectorVector have methods that (superficially) match. They are now connect_vec and concat_vec, which means that they can actually be called.
2013-06-15std: rename .connect/.concat in VectorVector to avoid conflicting with ↵Huon Wilson-16/+18
StrVector. This is caused by StrVector having a generic implementation for &[S] and so #5898 means that method resolution of ~[~[1]].concat() sees that both StrVector and VectorVector have methods that (superficially) match. They are now connect_vec and concat_vec, which means that they can actually be called.