Sun, 27 Jan 2019 03:31:37 +0400

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
Valentin Popov 2019-01-27 03:31:37 +04:00
parent b591a9c567
commit 65ab398355
Signed by: Valentin Popov
GPG Key ID: 269A00ACA90A8EA3

View File

@ -1,5 +1,6 @@
use std::fs::File;
use std::io::BufReader;
use std::path::Path;
extern crate clap;
use clap::{load_yaml, App};
@ -13,7 +14,11 @@ fn main() {
let path = matches.value_of("FILE").unwrap();
let file: File = File::open(path).unwrap();
let data: ParserResult = parse(BufReader::new(file));
dbg!(data.meeting_name);
match Path::new(path).exists() {
true => {
let file: File = File::open(path).unwrap();
let data: ParserResult = parse(BufReader::new(file));
}
_ => panic!("Error File!"),
};
}