ruff/crates/ruff_formatter/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
..
format_element Replace `.map_or(false, $closure)` with `.is_some_and(closure)` (#6244) 2023-08-01 19:29:42 +02:00
printer Respect indent when measuring with `MeasureMode::AllLines` (#6120) 2023-07-27 10:22:13 -04:00
arguments.rs Run nightly Clippy over the Ruff repo (#5670) 2023-07-10 23:44:38 -04:00
buffer.rs Run `rustfmt` on nightly to clean up erroneous comments (#5106) 2023-06-15 00:19:05 +00:00
builders.rs Replace `.map_or(false, $closure)` with `.is_some_and(closure)` (#6244) 2023-08-01 19:29:42 +02:00
diagnostics.rs Add message to formatter SyntaxError (#5881) 2023-07-19 17:15:26 +02:00
format_element.rs Remove `mode` from `BestFitting` 2023-07-11 14:19:26 +02:00
format_extensions.rs Fix typos found by codespell (#5607) 2023-07-08 12:33:18 +02:00
formatter.rs Remove dependency on `ruff_rowan` (#2875) 2023-02-15 03:54:08 +00:00
group_id.rs Disallow `unreachable_pub` (#4314) 2023-05-11 18:00:00 -04:00
lib.rs playground: Add AST/Tokens/Formatter panels (#5859) 2023-07-19 14:46:08 +00:00
macros.rs Add BestFittingMode (#5184) 2023-06-20 18:16:01 +02:00
prelude.rs Remove dependency on `ruff_rowan` (#2875) 2023-02-15 03:54:08 +00:00
source_code.rs Leading, Dangling, and Trailing comments formatting (#4785) 2023-06-02 09:26:36 +02:00