cut: remove unnecessary return type
@@ -337,7 +337,7 @@ fn cut_fields<R: Read>(reader: R, ranges: &[Range], opts: &FieldOptions) -> URes
Ok(())
}
-fn cut_files(mut filenames: Vec<String>, mode: &Mode) -> UResult<()> {
+fn cut_files(mut filenames: Vec<String>, mode: &Mode) {
let mut stdin_read = false;
if filenames.is_empty() {
@@ -377,8 +377,6 @@ fn cut_files(mut filenames: Vec<String>, mode: &Mode) -> UResult<()> {
}));
}
}
-
- Ok(())
}
mod options {
@@ -526,7 +524,10 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
.collect();
match mode_parse {
- Ok(mode) => cut_files(files, &mode),
+ Ok(mode) => {
+ cut_files(files, &mode);
+ Ok(())
+ }
Err(e) => Err(USimpleError::new(1, e)),
}
}
