mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-30 11:37:37 +00:00
**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^ |
||
|---|---|---|
| .. | ||
| snapshots | ||
| config.rs | ||
| execution_environment.rs | ||
| host.rs | ||
| implicit_imports.rs | ||
| import_result.rs | ||
| lib.rs | ||
| module_descriptor.rs | ||
| native_module.rs | ||
| py_typed.rs | ||
| python_platform.rs | ||
| python_version.rs | ||
| resolver.rs | ||
| search.rs | ||