ruff/crates/ruff_python_resolver/src
konsti 1df7e9831b
Replace .map_or(false, $closure) with .is_some_and(closure) (#6244)
**Summary**
[Option::is_some_and](https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.is_some_and)
and
[Result::is_ok_and](https://doc.rust-lang.org/std/result/enum.Result.html#method.is_ok_and)
are new methods is rust 1.70. I find them way more readable than
`.map_or(false, ...)`.

The changes are `s/.map_or(false,/.is_some_and(/g`, then manually
switching to `is_ok_and` where the value is a Result rather than an
Option.

**Test Plan** n/a^
2023-08-01 19:29:42 +02:00
..
snapshots Add dedicated struct for implicit imports (#5427) 2023-06-28 18:55:43 +00:00
config.rs Misc. clean-up for import resolver (#5401) 2023-06-27 19:27:12 +00:00
execution_environment.rs Port Pyright's import resolver to Rust (#5381) 2023-06-27 16:15:07 +00:00
host.rs Port Pyright's import resolver to Rust (#5381) 2023-06-27 16:15:07 +00:00
implicit_imports.rs Format let-else with rustfmt nightly (#5461) 2023-07-03 02:13:35 +00:00
import_result.rs Add dedicated struct for implicit imports (#5427) 2023-06-28 18:55:43 +00:00
lib.rs Fix CI by downgrading to cargo insta 1.29.0 (#5589) 2023-07-08 14:54:49 +00:00
module_descriptor.rs Port Pyright's import resolver to Rust (#5381) 2023-06-27 16:15:07 +00:00
native_module.rs Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00
py_typed.rs Port Pyright's import resolver to Rust (#5381) 2023-06-27 16:15:07 +00:00
python_platform.rs Make lib iteration platform-specific (#5406) 2023-06-28 13:52:20 +00:00
python_version.rs Port Pyright's import resolver to Rust (#5381) 2023-06-27 16:15:07 +00:00
resolver.rs Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00
search.rs Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00