chore: add FFFD to spell-checker ignore list in fmt test.
2c617d4
1 month ago
by mattsu2020
-0.01%
refactor(uu/fmt): switch string outputs to byte slices for efficiency
- Changed `indent_str` field in `BreakArgs` to `indent: &[u8]` to avoid repeated UTF-8 conversions.
- Updated `write_all` calls to pass `&s` instead of `s.as_bytes()` in fmt.rs and similar string/byteslicing in linebreak.rs.
- Modified method signatures in parasplit.rs to accept `&[u8]` instead of `&str` for prefix matching, ensuring consistent byte-level operations without assuming valid UTF-8.
db77543
1 month ago
by mattsu2020
0%
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.
4445c5a
1 month ago
by mattsu2020
+2.07%
style(fmt): compact whitespace check in WordSplit iterator to single line
Refactored the is_whitespace assignment by combining chained method calls on one line for improved conciseness and readability.
c59f1bc
1 month ago
by mattsu2020
-2.09%
fix(test_fmt): align invalid UTF-8 handling with GNU-compatible passthrough
Updated test_fmt_invalid_utf8 to expect raw byte (\xA0) passthrough instead of replacement character (\u{FFFD}) for invalid UTF-8 input, ensuring GNU-compatible behavior in fmt. This fixes the test expectation to match actual output, avoiding lossy conversion.