summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs22
1 files changed, 11 insertions, 11 deletions
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),
+ };
}