mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:31 +00:00
Move duplicate code out of conditional
This commit is contained in:
1 parent
92c974d066
commit
faebee7b8c
1 file changed
+1
-2
+1
-2
@@ -272,10 +272,9 @@ fn main() {
|
||||
if let Err(err) = result {
|
||||
if let Some(clap_err) = err.downcast_ref::<clap::Error>() {
|
||||
eprint!("{}", clap_err); // Clap errors already have newlines
|
||||
std::process::exit(1);
|
||||
} else {
|
||||
eprintln!("Error: {}", err);
|
||||
std::process::exit(1);
|
||||
}
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user