mirror of
https://github.com/sayanarijit/xplr.git
synced 2024-09-11 11:05:39 +03:00
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);
|
|
}
|
|
}
|
|
}
|