refactor(pi_uu_grep): behavior-preserving cleanup\n\nOp: compress

This commit is contained in:
metaphorics
2026-07-03 05:04:55 +09:00
parent 6680312a25
commit 17d9ab3b24
+5 -10
View File
@@ -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),
},
}
}