Closed tottoto closed 2 months ago
The Option::map and Option::unwrap_or methods combination could be written as more idiomatic API Option::map_or. In this case, there is a more idiomatic API Option::is_some_and, but it requires Rust 1.70.
Option::map
Option::unwrap_or
Option::map_or
Option::is_some_and
https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some_and
The
Option::map
andOption::unwrap_or
methods combination could be written as more idiomatic APIOption::map_or
. In this case, there is a more idiomatic APIOption::is_some_and
, but it requires Rust 1.70.https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some_and