about summary refs log tree commit diff
path: root/src/libstd/either.rs
AgeCommit message (Collapse)AuthorLines
2014-01-03Remove std::eitherAlex Crichton-248/+0
2013-12-27std: uniform modules titles for docLuca Bruno-1/+1
This commit uniforms the short title of modules provided by libstd, in order to make their roles more explicit when glancing at the index. Signed-off-by: Luca Bruno <lucab@debian.org>
2013-12-14Remove {As,Into,To}{Option,Either,Result} traits.Chris Morgan-187/+0
Expanded, that is: - `AsOption` - `IntoOption` - `ToOption` - `AsEither` - `IntoEither` - `ToEither` - `AsResult` - `IntoResult` - `ToResult` These were defined for each other but never *used* anywhere. They are all trivial and so removal will have negligible effect upon anyone. `Either` has fallen out of favour (and its implementation of these traits of dubious semantics), `Option<T>` → `Result<T, ()>` was never really useful and `Result<T, E>` → `Option<T>` should now be done with `Result.ok()` (mirrored with `Result.err()` for even more usefulness). In summary, there's really no point in any of these remaining.
2013-11-26libstd: Remove all non-`proc` uses of `do` from libstdPatrick Walton-4/+4
2013-11-19libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstdPatrick Walton-1/+1
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-2/+2
Who doesn't like a massive renaming?
2013-09-30std: Remove usage of fmt!Alex Crichton-2/+2
2013-09-12std: Add ToEither/IntoEither/AsEitherErick Tryzelaar-0/+62
2013-09-12std: Add ToResult/IntoResult/AsResultErick Tryzelaar-12/+62
2013-09-12std: Add ToOption/IntoOption/AsOptionErick Tryzelaar-0/+60
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-1/+1
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-08-15Update either::partitionblake2-ppc-2/+3
Remove the only use of either::partition since it was better accomplished with vector methods. Update either::partition so that it sizes the vectors correctly before it starts.
2013-08-15std: Change either::{lefts, rights} to return an iteratorblake2-ppc-25/+28
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-1/+1
cc #7887
2013-08-07Add initial support for a new formatting syntaxAlex Crichton-1/+1
The new macro is available under the name ifmt! (only an intermediate name)
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-193/+173
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-03remove obsolete `foreach` keywordDaniel Micay-3/+3
this has been replaced by `for`
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-4/+5
2013-07-20Add Either::expect_{left,right}Ben Blum-6/+26
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-5/+5
2013-07-04Implement consuming iterators for ~[], remove vec::{consume, ↵Huon Wilson-1/+1
consume_reverse, map_consume}.
2013-06-23vec: remove BaseIter implementationDaniel Micay-4/+4
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-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-14/+14
2013-06-16Add copies to type params with Copy boundNiko Matsakis-2/+2
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-8/+10
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+256
This only changes the directory names; it does not change the "real" metadata names.
2011-12-14Remove some duplicated unused parts of std now that they're present in core.Graydon Hoare-89/+0
2011-12-06Establish 'core' library separate from 'std'.Graydon Hoare-0/+89