mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #4196 from cakebaker/cut_remove_unnecessary_return_type
cut: remove unnecessary return type
This commit is contained in:
commit
403780a613
1 changed files with 5 additions and 4 deletions
|
@ -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)),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue