refactor(pi_uu_grep): behavior-preserving cleanup\n\nOp: compress
This commit is contained in:
@@ -927,16 +927,11 @@ fn process_file<W: Write>(
|
||||
opts: &SearchOptions,
|
||||
out: &mut W,
|
||||
) -> SearchOutcome {
|
||||
match File::open(path) {
|
||||
Ok(file) => match process_reader(matcher, searcher, file, display, opts, out) {
|
||||
Ok(any_match) => SearchOutcome { any_match, had_error: false },
|
||||
Err(err) => SearchOutcome {
|
||||
any_match: false,
|
||||
had_error: report_path_error(display, path, err, opts),
|
||||
},
|
||||
},
|
||||
Err(err) => {
|
||||
SearchOutcome { any_match: false, had_error: report_path_error(display, path, err, opts) }
|
||||
match File::open(path).and_then(|file| process_reader(matcher, searcher, file, display, opts, out)) {
|
||||
Ok(any_match) => SearchOutcome { any_match, had_error: false },
|
||||
Err(err) => SearchOutcome {
|
||||
any_match: false,
|
||||
had_error: report_path_error(display, path, err, opts),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user