From d380e1db3c60c40b1e7129ed8ba527b37b3276d4 Mon Sep 17 00:00:00 2001 From: jamesray1 <16969914+jamesray1@users.noreply.github.com> Date: Fri, 13 Apr 2018 14:33:19 +1000 Subject: [PATCH] Add src/bin, bin/bin.rs --- src/bin/bin.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/bin/bin.rs diff --git a/src/bin/bin.rs b/src/bin/bin.rs new file mode 100644 index 0000000..8a3a019 --- /dev/null +++ b/src/bin/bin.rs @@ -0,0 +1,18 @@ +extern crate diamond_drops; + +use diamond_drops::cli; +use diamond_drops::run; + +use std::env; +use std::process; + +fn main() { + let args = env::args().skip(1).collect::>(); + + let config = cli::args::parse_args(args).unwrap_or_else(|err| { + eprintln!("Problem parsing arguments: {}", err); + process::exit(1); + }); + + run(config); +} \ No newline at end of file