1
Fork 0
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:
Sylvestre Ledru 2022-12-02 07:47:49 +01:00 committed by GitHub
commit 403780a613
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)),
}
}