diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-01 10:50:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-01 10:50:22 +0100 |
| commit | ce197e2bceca00372c172a02a966b96287476c55 (patch) | |
| tree | c9ea56c75b2c5ce11db09ba35d50ba517fc73c42 /compiler/rustc_codegen_gcc/example/std_example.rs | |
| parent | c09c16c0dff47b1ec143c266c3c06acdc84a4257 (diff) | |
| parent | 2e8358e1ab933c6599b40294c0b33a1a17d19a23 (diff) | |
| download | rust-ce197e2bceca00372c172a02a966b96287476c55.tar.gz rust-ce197e2bceca00372c172a02a966b96287476c55.zip | |
Rollup merge of #91346 - ibraheemdev:result-inspect, r=dtolnay
Add `Option::inspect` and `Result::{inspect, inspect_err}`
```rust
// core::result
impl Result<T, E> {
pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self;
pub fn inspect_err<F: FnOnce(&E)>(self, f: F) -> Self;
}
// core::option
impl Option<T> {
pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self;
}
```
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions
