Commit 4445c5a
committed
refactor(fmt): replace Option::map_or(false, f) with is_some_and(f)
- Updated indentation calculation in FileLines to use is_some_and for tab and character checks,
avoiding unnecessary computations and improving code flow.
- Changed punctuation checks in WordSplit iterator to use is_some_and for cleaner,
more idiomatic Rust code.
- This refactor enhances readability and leverages short-circuiting behavior.1 parent db77543 commit 4445c5a
1 file changed
+10
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
| |||
652 | 654 | | |
653 | 655 | | |
654 | 656 | | |
655 | | - | |
| 657 | + | |
656 | 658 | | |
657 | 659 | | |
658 | 660 | | |
| |||
676 | 678 | | |
677 | 679 | | |
678 | 680 | | |
679 | | - | |
| 681 | + | |
680 | 682 | | |
681 | 683 | | |
682 | 684 | | |
| |||
0 commit comments