Skip to content

Commit f565cdb

Browse files
committed
clippy: fix warnings from needless_return lint
1 parent 9534bb7 commit f565cdb

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/uu/od/src/prn_float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ fn format_float(f: f64, width: usize, precision: usize) -> String {
120120
} else if l == -1 {
121121
format!("{f:width$.precision$}")
122122
} else {
123-
return format_f64_exp_precision(f, width, precision - 1); // subnormal numbers
123+
format_f64_exp_precision(f, width, precision - 1) // subnormal numbers
124124
}
125125
}
126126

src/uu/split/src/split.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,9 @@ where
630630
} else if input == "-" {
631631
// STDIN stream that did not fit all content into a buffer
632632
// Most likely continuous/infinite input stream
633-
return Err(io::Error::other(
633+
Err(io::Error::other(
634634
translate!("split-error-cannot-determine-input-size", "input" => input),
635-
));
635+
))
636636
} else {
637637
// Could be that file size is larger than set read limit
638638
// Get the file size from filesystem metadata
@@ -655,9 +655,9 @@ where
655655
// Give up and return an error
656656
// TODO It might be possible to do more here
657657
// to address all possible file types and edge cases
658-
return Err(io::Error::other(
658+
Err(io::Error::other(
659659
translate!("split-error-cannot-determine-file-size", "input" => input),
660-
));
660+
))
661661
}
662662
}
663663
}

src/uucore/src/lib/features/checksum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ fn process_checksum_line(
989989
process_non_algo_based_line(i, &line_info, cli_algo, cli_algo_length, opts)
990990
} else {
991991
// We have no clue of what algorithm to use
992-
return Err(LineCheckError::ImproperlyFormatted);
992+
Err(LineCheckError::ImproperlyFormatted)
993993
}
994994
}
995995

0 commit comments

Comments
 (0)