diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-03-15 17:46:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-15 17:46:36 -0400 |
commit | fb021d7ceff3f8b1d7cdb0c2bdd75ea07c0428d2 (patch) | |
tree | 09cb2bf87bba760b1abf706e0b8faedc9c368bbc /cli/bench | |
parent | ca51f4f6c058d16ac438ad75ac92e8954895f5aa (diff) |
refactor: remove usages of `map_or` / `map_or_else` (#18212)
These methods are confusing because the arguments are backwards. I feel
like they should have never been added to `Option<T>` and that clippy
should suggest rewriting to
`map(...).unwrap_or(...)`/`map(...).unwrap_or_else(|| ...)`
https://github.com/rust-lang/rfcs/issues/1025
Diffstat (limited to 'cli/bench')
-rw-r--r-- | cli/bench/http.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/bench/http.rs b/cli/bench/http.rs index 06a177386..065d6f657 100644 --- a/cli/bench/http.rs +++ b/cli/bench/http.rs @@ -174,7 +174,7 @@ fn run( println!("{output}"); assert!( - server.try_wait()?.map_or(true, |s| s.success()), + server.try_wait()?.map(|s| s.success()).unwrap_or(true), "server ended with error" ); |