mozilla/rust — pull request #10364 by Kimundi (2013-11-08 18:44:46+00:00)
Title: Made Results API more composable

This implements the changes to `Result` I proposed and discussed in this thread: https://mail.mozilla.org/pipermail/rust-dev/2013-November/006254.html

This PR includes:
- Renaming `unwrap` to `get` for `Result` (Doing it for `Option` too would be to big of a change for this PR).
- Renaming `map_default` and `mutate_default` to `map_or` and `mutate_or_set`.
- Adding `ok()` and `err()` option adapters for both `Result` variants.
- Removing `get_ref`, `expect` and iterator constructors for `Result`, as they are reachable with the variant adapters.
- Removing `Result`s `ToStr` bound on the error type because of composability issues. (See https://mail.mozilla.org/pipermail/rust-dev/2013-November/006283.html)