aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2019-01-27 16:41:59 +0300
committerValentin Popov <info@valentineus.link>2019-01-27 16:41:59 +0300
commit33d1a608e6f2718b045d08fa530ba1790a21ff36 (patch)
treeb91679e2d7a8b158f04e96f920a0f98d10a4afcf /src/main.rs
parenta0694a3418534cc6e74e7b269327893fda5b57e9 (diff)
downloadbbb2json-33d1a608e6f2718b045d08fa530ba1790a21ff36.tar.xz
bbb2json-33d1a608e6f2718b045d08fa530ba1790a21ff36.zip
Sun, 27 Jan 2019 17:41:59 +0400
Signed-off-by: Valentin Popov <info@valentineus.link>
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),
+ };
}