We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12f900d commit 9a67924Copy full SHA for 9a67924
src/uu/fold/src/fold.rs
@@ -590,13 +590,11 @@ fn fold_file<T: Read, W: Write>(
590
591
if let Some(pos) = buffer.iter().position(|&b| b == b'\n') {
592
consume_len = pos + 1;
593
- } else {
594
- if let Err(e) = std::str::from_utf8(buffer) {
595
- if e.error_len().is_none() {
596
- let valid = e.valid_up_to();
597
- if valid > 0 {
598
- consume_len = valid;
599
- }
+ } else if let Err(e) = std::str::from_utf8(buffer) {
+ if e.error_len().is_none() {
+ let valid = e.valid_up_to();
+ if valid > 0 {
+ consume_len = valid;
600
}
601
602
0 commit comments