mirror of
https://github.com/sayanarijit/xplr
synced 2024-11-14 18:12:54 +00:00
13d046e6ad
fn runner() and fn from_cli(cli: Cli) util functions are located to app.rs. However, those are utils for runner. So this commit change the functions to runner.rs.
14 lines
317 B
Rust
14 lines
317 B
Rust
fn main() {
|
|
match xplr::runner::runner().and_then(|a| a.run()) {
|
|
Ok(Some(out)) => print!("{}", out),
|
|
Ok(None) => {}
|
|
Err(err) => {
|
|
if !err.to_string().is_empty() {
|
|
eprintln!("error: {}", err);
|
|
};
|
|
|
|
std::process::exit(1);
|
|
}
|
|
}
|
|
}
|