| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-07-27 | mv std libs to library/ | mark | -1588/+0 | |
| 2020-06-20 | Fix broken inner_deref doc tests. | Eric Huss | -2/+6 | |
| 2020-06-18 | Improve document for `Result::as_deref(_mut)` | Lzu Tao | -16/+40 | |
| 2020-04-04 | docs: make the description of Result::map_or more clear | Ponas | -2/+4 | |
| 2020-03-19 | Add Result<Result<T, E>, E>::flatten -> Result<T, E> | Wim Looman | -1/+33 | |
| 2020-02-09 | Rollup merge of #68918 - brson:unwrapdoc, r=Dylan-DPC | Dylan DPC | -53/+59 | |
| Don't use the word "unwrap" to describe "unwrap" methods It's tautological, and "unwrap" is essentially Rust-specific jargon. I was teaching a newbie some Rust, and doing the usual hand-waving about error handling using unwrap. They asked what 'unwrap' means. I said look it up in the docs. The docs read (paraphrased) "unwrap unwraps". I was embarrassed. This changes all the Option/Result functions with unwrapping behavior to use a variation on a single description: > "Returns the contained `Some/Ok` value [or ...]." It also renames the closure of `Result::unwrap_or_else` to `default` for consistency with `Option`, and perhaps makes a few other small tweaks. Previous: https://github.com/rust-lang/rust/pull/68849 | ||||
| 2020-02-07 | Don't use the word 'unwrap' to describe core unwrapping functions | Brian Anderson | -16/+22 | |
| It's tautological, and Rust-specific Jargon. This changes various Option/Result methods to consistently describe unwrapping behavior using the words "return", "contain", "consume". It also renames the closure argument of `Return::unwrap_or_else` to `default` to be consistent with `Option`. | ||||
| 2020-02-06 | Mark fn map_or() as eagerly evaluated. | Tom A. Wagner | -0/+6 | |
| In the docs for option.rs and result.rs, it is noted for all *_or() functions that they are eagerly evaluated, except for the map_or() function. This commit adds this missing documentation to the two files. | ||||
| 2020-02-05 | Reorder declarations of Result::expect_err/unwrap_err to match Option | Brian Anderson | -22/+22 | |
| 2020-02-05 | Reorder declarations of Result::export/unwrap to match Option | Brian Anderson | -17/+17 | |
| 2020-01-23 | use `diagnostic_item` and modify wording | Esteban Küber | -0/+1 | |
| 2020-01-11 | Rename Result::as_deref_ok to as_deref | Lzu Tao | -25/+2 | |
| 2020-01-11 | Rollup merge of #66045 - mzabaluev:unwrap-infallible, r=dtolnay | Yuki Okushi | -0/+38 | |
| Add method Result::into_ok Implementation of https://github.com/rust-lang/rfcs/pull/2799 Tracking issue #61695 | ||||
| 2020-01-09 | Rollup merge of #67966 - popzxc:core-std-matches, r=Centril | Mazdak Farrokhzad | -4/+1 | |
| Use matches macro in libcore and libstd This PR replaces matches like ```rust match var { value => true, _ => false, } ``` with use of `matches!` macro. r? @Centril | ||||
| 2020-01-08 | Use matches macro in libcore and libstd | Igor Aleksanov | -4/+1 | |
| 2020-01-04 | Result's panics have `#[track_caller]`. | Adam Perry | -0/+5 | |
| 2019-12-31 | Constify Result | Lukas Lueg | -3/+6 | |
| 2019-12-26 | Remove redundant link texts | Matthew Kraai | -1/+1 | |
| 2019-12-22 | Format the world | Mark Rousskov | -38/+58 | |
| 2019-12-22 | Rename Result::unwrap_infallible to into_ok | Mikhail Zabaluev | -2/+2 | |
| 2019-12-22 | Add Result::unwrap_infallible | Mikhail Zabaluev | -0/+38 | |
| Implementation of https://github.com/rust-lang/rfcs/pull/2799 | ||||
| 2019-12-02 | stabilize Result::map_or | Lzu Tao | -2/+1 | |
| 2019-11-24 | Auto merge of #66322 - lzutao:consistent-result-map_or_else, r=dtolnay | bors | -4/+6 | |
| Stabilize Result::map_or_else Stabilized this API: ```rust impl<T, E> Result<T, E> { pub fn map_or_else<U, D: FnOnce(E) -> U, F: FnOnce(T) -> U>(self, default: D, f: F) -> U { match self { Ok(t) => f(t), Err(e) => default(e), } } } ``` Closes #53268 r? @SimonSapin | ||||
| 2019-11-12 | add Result::map_or | Lzu Tao | -0/+22 | |
| 2019-11-12 | stabilize Result::map_or_else | Lzu Tao | -2/+1 | |
| 2019-11-12 | make Result::map_or_else consistent with Option::map_or_else | Lzu Tao | -2/+5 | |
| 2019-09-04 | Auto merge of #63166 - ksqsf:master, r=alexcrichton | bors | -0/+81 | |
| Add Result::cloned{,_err} and Result::copied{,_err} This is a little nice addition to `Result`. 1. I'm not sure how useful are `cloned_err` and `copied_err`, but for the sake of completeness they are here. 2. Naming is similar to `map`/`map_err`. I thought about naming `cloned` as `cloned_ok` and add another method called `cloned` that clones both Ok and Err, but `cloned_ok` should be more prevalent than `cloned_both`. | ||||
| 2019-08-02 | Remove Err variants of cloned and copied | ksqsf | -79/+0 | |
| 2019-08-01 | Fix doc tests | ksqsf | -17/+17 | |
| 2019-08-01 | Revert "cloned/copied" | ksqsf | -140/+4 | |
| This reverts commit 6c130817623426697d8ebdf5d505487bd11ee2f6. | ||||
| 2019-08-01 | Rename {copied,cloned} to {copied,cloned}_ok, and add {copied,cloned} to ↵ | ksqsf | -4/+140 | |
| copy/clone both Ok and Err | ||||
| 2019-08-01 | Make these methods public | ksqsf | -8/+8 | |
| 2019-08-01 | Fix issue and impl | ksqsf | -9/+9 | |
| 2019-08-01 | Add Result::cloned{,_err} and Result::copied{,_err} | ksqsf | -0/+160 | |
| 2019-07-29 | Use internal iteration in the Sum and Product impls of Result and Option | Tim Vermeulen | -2/+2 | |
| 2019-07-27 | Refactoring use commun code between option, result and accum | Stargateur | -34/+2 | |
| 2019-07-18 | Use DerefMut | Yuki Okushi | -1/+1 | |
| 2019-07-18 | renamed `inner_deref` feature's `deref*()` methods `as_deref*()` as per ↵ | Brad Gibson | -15/+48 | |
| discussion https://github.com/rust-lang/rust/issues/50264 | ||||
| 2019-07-17 | Auto merge of #62596 - cuviper:expect_none, r=rkruppe | bors | -5/+5 | |
| Add Option::expect_none(msg) and unwrap_none() These are `Option` analogues to `Result::expect_err` and `unwrap_err`. | ||||
| 2019-07-12 | Rollup merge of #62431 - czipperz:add-messages-to-must-use-is_-methods, ↵ | Mazdak Farrokhzad | -2/+2 | |
| r=scottmcm Add messages to `Option`'s and `Result`'s `must_use` annotation for `is_*` r? @RalfJung | ||||
| 2019-07-11 | Make cold unwraps take &dyn Debug | Josh Stone | -5/+5 | |
| 2019-07-07 | Implement Option::contains, Result::contains and Result::contains_err | Simon Ochsenreither | -0/+52 | |
| This increases consistency with other common data structures. | ||||
| 2019-07-05 | Add messages to Option and Result must_use for is_* | Chris Gregory | -2/+2 | |
| 2019-06-01 | Implement Clone::clone_from for Result. | Mara Bos | -1/+22 | |
| 2019-04-19 | libcore: deny more... | Mazdak Farrokhzad | -2/+2 | |
| 2019-04-18 | libcore => 2018 | Taiki Endo | -3/+3 | |
| 2019-04-08 | Add must_use annotations to Result::is_ok and is_err | Alex Gaynor | -0/+2 | |
| 2019-03-25 | add missing braces | Felix S Klock II | -2/+2 | |
| add missing braces analogous to those suggested by killercup | ||||
| 2019-03-22 | Expand `impl FromIterator for Result` doc to include examples of `Err` and ↵ | Felix S. Klock II | -0/+28 | |
| early termination. | ||||
| 2019-03-15 | Option and Result: Add references to documentation of as_ref and as_mut | Chris Gregory | -2/+2 | |
