summary refs log tree commit diff
path: root/src/libstd/tuple.rs
AgeCommit message (Collapse)AuthorLines
2013-09-25std: Replace CloneableTuple with Tuple, which takes self by-val.Huon Wilson-98/+100
The old behaviour of `foo.n0()` is replaced by `foo.n0_ref().clone()`.
2013-09-12std: Add a bunch of Default implsErick Tryzelaar-0/+9
2013-08-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-1/+1
This removes the stacking of type parameters that occurs when invoking trait methods, and fixes all places in the standard library that were relying on it. It is somewhat awkward in places; I think we'll probably want something like the `Foo::<for T>::new()` syntax.
2013-08-15tuple: remove obsolete ExtendedTupleOpsDaniel Micay-52/+0
replaced by iterators (generic composable `map` and `zip` adaptors)
2013-08-12auto merge of #8400 : blake2-ppc/rust/seq-ord, r=cmrbors-31/+49
Use Eq + Ord for lexicographical ordering of sequences. For each of <, <=, >= or > as R, use:: [x, ..xs] R [y, ..ys] = if x != y { x R y } else { xs R ys } Previous code using `a < b` and then `!(b < a)` for short-circuiting fails on cases such as [1.0, 2.0] < [0.0/0.0, 3.0], where the first element was effectively considered equal. Containers like &[T] did also implement only one comparison operator `<`, and derived the comparison results from this. This isn't correct either for Ord. Implement functions in `std::iterator::order::{lt,le,gt,ge,equal,cmp}` that all iterable containers can use for lexical order. We also visit tuple ordering, having the same problem and same solution (but differing implementation).
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-2/+2
cc #5898
2013-08-10std: merge Iterator and IteratorUtilErick Tryzelaar-1/+1
2013-08-09std::tuple: Use != properly in Eq::ne for tuplesblake2-ppc-1/+1
Just like the Ord methods, Eq::ne needs to be implemented in terms of the same operation on the elements.
2013-08-08std: Fix tuple lexicographical orderblake2-ppc-14/+28
Use the definition, where R is <, <=, >=, or > [x, ..xs] R [y, ..ys] = if x != y { x R y } else { xs R ys } Previously, tuples would only implement < and derive the other comparisons from it; this is incorrect. Included are several testcases involving NaN comparisons that are now correct. Previously, tuples would consider an element equal if both a < b and b < a were false, this was also incorrect.
2013-08-08std: Implement traits for the one-tupleblake2-ppc-20/+24
(A,) did not have the trait implementations of 2- to 12- tuples.
2013-07-20rm obsolete no-op lintsDaniel Micay-1/+0
2013-07-17librustc: Remove all uses of the `Copy` bound.Patrick Walton-7/+3
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-8/+16
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-2/+4
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-18/+18
2013-06-16Add copies to type params with Copy boundNiko Matsakis-3/+3
2013-06-14Add Zero impls for lots of common typesAlex Crichton-0/+13
2013-06-04librustc: Disallow multiple patterns from appearing in a "let" declaration.Patrick Walton-1/+1
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-05-30Require documentation by default for libstdAlex Crichton-0/+10
Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+439
This only changes the directory names; it does not change the "real" metadata names.
2012-01-17libstd => libcoreLenny222-28/+0
2012-01-17spin-off rustdocs tuple code to libstdLenny222-0/+28