From 33d1a608e6f2718b045d08fa530ba1790a21ff36 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sun, 27 Jan 2019 17:41:59 +0400 Subject: Sun, 27 Jan 2019 17:41:59 +0400 Signed-off-by: Valentin Popov --- src/main.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 6135a15..dbf0f28 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,17 +15,17 @@ mod parser; use parser::*; fn main() { - let yaml = load_yaml!("cli/en.yml"); - let matches = App::from_yaml(yaml).get_matches(); + let yaml = load_yaml!("cli/en.yml"); + let matches = App::from_yaml(yaml).get_matches(); - let path = matches.value_of("FILE").unwrap(); + let path = matches.value_of("FILE").unwrap(); - match Path::new(path).exists() { - true => { - let file: File = File::open(path).unwrap(); - let data: ParserResult = parser(BufReader::new(file)); - println!("{}", serde_json::to_string_pretty(&data).unwrap()); - } - _ => panic!("File {:#?} does not exist or is not available.", path), - }; + match Path::new(path).exists() { + true => { + let file: File = File::open(path).unwrap(); + let data: ParserResult = parser(BufReader::new(file)); + println!("{}", serde_json::to_string_pretty(&data).unwrap()); + } + _ => panic!("File {:#?} does not exist or is not available.", path), + }; } -- cgit v1.2.3