From c6271541765b06c8437491e012de19da08b0ab3e Mon Sep 17 00:00:00 2001 From: a14m Date: Sat, 3 Apr 2021 00:40:30 +0200 Subject: Update main to show parsed options and handle errors --- CLI/rust/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CLI/rust/src/main.rs b/CLI/rust/src/main.rs index 71f81e5..a831dd8 100644 --- a/CLI/rust/src/main.rs +++ b/CLI/rust/src/main.rs @@ -1,6 +1,7 @@ mod game_of_life; fn main() { - let matches = game_of_life::options().unwrap_or_else(|e| e.exit()); - println!("{:?}", matches); + let opts = game_of_life::opts::Opts::from(game_of_life::app().get_matches()) + .unwrap_or_else(|e| e.exit()); + println!("{:?}", opts); } -- cgit v1.2.3