Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a clippy "unnecessary closure" warning
Clippy 1.59 beta says: error: unnecessary closure used to substitute value for `Option::None` --> src/properties.rs:119:22 | 119 | let offset = reply | ______________________^ 120 | | .value 121 | | .iter() 122 | | .position(|&v| v == 0) 123 | | .unwrap_or_else(|| reply.value.len()); | |_________________________________________________^ | = note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations help: use `unwrap_or` instead | 119 ~ let offset = reply 120 + .value 121 + .iter() 122 ~ .position(|&v| v == 0).unwrap_or(reply.value.len()); | Signed-off-by: Uli Schlachter <[email protected]>
- Loading branch information