mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-06 03:25:23 +00:00
refactor(exit): use std::process::exit explicitly (#84)
This commit is contained in:
parent
d3c16af4e9
commit
30f1940815
@ -1,4 +1,5 @@
|
||||
use std::io::{stdout, IsTerminal, Write};
|
||||
use std::process::exit;
|
||||
|
||||
use clap::Parser;
|
||||
use cli::PostProcessedCli;
|
||||
@ -57,11 +58,11 @@ async fn main() -> Result<()> {
|
||||
if let Some(entry) = output.selected_entry {
|
||||
writeln!(stdout(), "{}", entry.stdout_repr())?;
|
||||
}
|
||||
Ok(())
|
||||
exit(0);
|
||||
}
|
||||
Err(err) => {
|
||||
println!("{err:?}");
|
||||
return Ok(());
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user