mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/exe/mod.rs')
-rw-r--r--src/exe/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/exe/mod.rs b/src/exe/mod.rs
index e97d77b..2c6113b 100644
--- a/src/exe/mod.rs
+++ b/src/exe/mod.rs
@@ -1,5 +1,3 @@
-use std::env::Args;
-
pub mod args;
pub mod edit;
pub mod print;
@@ -29,8 +27,10 @@ macro_rules!print_err
}
pub(crate) use print_err;
-pub fn main(mut args: Args)
+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"),
@@ -38,4 +38,4 @@ pub fn main(mut args: Args)
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