Overall cleanup, refactor and performance tweaks
This commit is contained in:
parent
7d89f51eac
commit
ae9ab02dc4
9 changed files with 241 additions and 183 deletions
12
src/main.rs
12
src/main.rs
|
|
@ -2,11 +2,17 @@ use tori::{conf, log, run, state};
|
|||
|
||||
fn main() -> std::process::ExitCode {
|
||||
log::elog(&format!("tori {}", env!("CARGO_PKG_VERSION")));
|
||||
let configuration = conf::load();
|
||||
let configuration = match conf::load() {
|
||||
Ok(c) => c,
|
||||
Err(error) => {
|
||||
eprintln!("Configuration error: {error}");
|
||||
return 1.into()
|
||||
},
|
||||
};
|
||||
log::elog(&format!("Configuration: {configuration:#?}"));
|
||||
let order = run::teller::parse(std::env::args(), &configuration);
|
||||
let order = run::teller::parse(std::env::args());
|
||||
log::elog(&format!("Order: {order:#?}"));
|
||||
let state = state::setup(&configuration, &[order]);
|
||||
let state = state::setup(configuration, &[order]);
|
||||
log::elog(&format!("State: {state:#?}"));
|
||||
let result = run::expeditor::fulfill(&state);
|
||||
log::elog(&format!("Filled Order: {result:#?}"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue