summary refs log tree commit diff
path: root/src/libstd/result.rs
AgeCommit message (Collapse)AuthorLines
2014-01-07stdtest: Fix all leaked trait importsAlex Crichton-2/+1
2013-12-29auto merge of #11134 : lucab/rust/lucab/libstd-doc, r=cmrbors-1/+1
Uniform the short title of modules provided by libstd, in order to make their roles more explicit when glancing at the index.
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-26std: result::collect to take an iterator, add option::collectErick Tryzelaar-28/+32
2013-12-14Remove {As,Into,To}{Option,Either,Result} traits.Chris Morgan-132/+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-12-06Made Results API more composableMarvin Löbel-124/+43
2013-11-28Register new snapshotsAlex Crichton-2/+2
2013-11-26test: Remove non-procedure uses of `do` from compiletest, libstd tests,Patrick Walton-6/+6
compile-fail tests, run-fail tests, and run-pass tests.
2013-11-19libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstdPatrick Walton-10/+10
2013-11-01Fixed unused import warning in testsMarvin Löbel-1/+1
2013-11-01Removed legacy implementationsMarvin Löbel-60/+0
2013-11-01Cleaned up the option and result module in more detailMarvin Löbel-21/+12
Made both types implement more standard traits in a nicer way Derived more traits
2013-11-01Reordered the methods in std::Option and std::ResultMarvin Löbel-169/+154
Cleaned up the source in a few places Renamed `map_move` to `map`, removed other `map` methods Added `as_ref` and `as_mut` adapters to `Result` Added `fmt::Default` impl
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-6/+6
Who doesn't like a massive renaming?
2013-10-18Made `std::task::TaskBuilder::future_result()` easier to useMarvin Löbel-1/+0
2013-10-16Added Result implementations for ToStr and fmt::DefaultMarvin Löbel-6/+47
2013-09-30std: Remove usage of fmt!Alex Crichton-6/+8
2013-09-22std::result: Remove function `map_opt`blake2-ppc-13/+0
This function has never had any users in the tree
2013-09-12std: Rename {Option,Result}::chain{,_err}* to {and_then,or_else}Erick Tryzelaar-10/+55
2013-09-12std: Add ToEither/IntoEither/AsEitherErick Tryzelaar-21/+58
2013-09-12std: Add ToResult/IntoResult/AsResultErick Tryzelaar-0/+68
2013-09-12std: Add ToOption/IntoOption/AsOptionErick Tryzelaar-0/+60
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-2/+2
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-18auto merge of #8551 : huonw/rust/speling, r=alexcrichtonbors-1/+1
(This doesn't add/remove `u`s or change `ize` to `ise`, or anything like that.)
2013-08-16doc: correct spelling in documentation.Huon Wilson-1/+1
2013-08-15std: Replace map_vec, map_vec2, iter_vec2 in std::resultblake2-ppc-55/+84
Replace these with three functions based on iterators: collect, fold, and fold_. The mapping part is replaced by iterator .map(), so the part that these functions do is to accumulate the final Result<,> value. * `result::collect` gathers `Iterator<Result<V, U>>` to `Result<~[V], U>` * `result::fold` folds `Iterator<Result<T, E>>` to `Result<V, E>` * `result::fold_` folds `Iterator<Result<T, E>>` to `Result<(), E>`
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-2/+2
cc #7887
2013-08-07core: option.map_consume -> option.map_moveErick Tryzelaar-4/+4
2013-08-07std: add result.map_move, result.map_err_moveErick Tryzelaar-4/+52
2013-08-06std: Use method name Option::consumeblake2-ppc-2/+2
With Option as the simplest container, `consume` is the way to turn it into a by-value iterator.
2013-08-06std: Remove unused trait bound in Result::mapblake2-ppc-1/+1
2013-08-06std: Convert Result to use external iteratorsblake2-ppc-14/+18
convert iter() and iter_err() for Result. Use OptionIterator.
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-178/+149
- 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-1/+1
this has been replaced by `for`
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-2/+2
2013-07-27std: cleanup imports in result::testsErick Tryzelaar-8/+6
2013-07-27core: correct the casing of result::{Ok,Err} in the docsErick Tryzelaar-59/+57
2013-07-27to_either + fixesErick Tryzelaar-45/+49
2013-07-27cleanup .map and .map_errErick Tryzelaar-40/+33
2013-07-27cleanup .get and .get_errmaikklein-36/+29
2013-07-27cleanup .chain and .chain_err + fixing other filesmaikklein-62/+35
2013-07-27cleanup .unwrap and .unwrap_err fixing io testsErick Tryzelaar-19/+14
2013-07-27cleanup .iter and .iter_errErick Tryzelaar-47/+48
2013-07-27cleanup get_refErick Tryzelaar-17/+14
2013-07-20rm obsolete no-op lintsDaniel Micay-1/+0
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-29/+31
2013-06-23vec: remove BaseIter implementationDaniel Micay-3/+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-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-31/+31
2013-06-08remove deprecated vec::{is_empty, len} functionsDaniel Micay-3/+4
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-17/+17