mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/exe/mod.rs')
| -rw-r--r-- | src/exe/mod.rs | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/exe/mod.rs b/src/exe/mod.rs index 2c6113b..801e122 100644 --- a/src/exe/mod.rs +++ b/src/exe/mod.rs @@ -8,7 +8,7 @@ macro_rules!print_err { { use std::error::Error; - + let err = $err; eprint!($($msg)*); eprintln!(": {err}"); @@ -27,15 +27,13 @@ macro_rules!print_err } pub(crate) use print_err; -fn main() -{ - let mut args = std::env::args(); - args.next().unwrap(); // path to executable - match args.next() - { - None => eprintln!("Not enough arguments, valid commands are: edit, print"), - Some(s) if s == "edit" => edit::main(args, 1), - Some(s) if s == "print" => print::main(args, 1), - Some(s) => eprintln!("Unknown argument {s}, valid commands are: edit, print"), - } -}
\ No newline at end of file +fn main() { + let mut args = std::env::args(); + args.next().unwrap(); // path to executable + match args.next() { + None => eprintln!("Not enough arguments, valid commands are: edit, print"), + Some(s) if s == "edit" => edit::main(args, 1), + Some(s) if s == "print" => print::main(args, 1), + Some(s) => eprintln!("Unknown argument {s}, valid commands are: edit, print"), + } +} |