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;
}
```
|
||
|---|---|---|
| .. | ||
| benches | ||
| primitive_docs | ||
| src | ||
| tests | ||
| Cargo.toml | ||