Sun, 27 Jan 2019 03:31:37 +0400
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
parent
b591a9c567
commit
65ab398355
@ -1,5 +1,6 @@
|
|||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
use clap::{load_yaml, App};
|
use clap::{load_yaml, App};
|
||||||
@ -13,7 +14,11 @@ fn main() {
|
|||||||
|
|
||||||
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 file: File = File::open(path).unwrap();
|
||||||
let data: ParserResult = parse(BufReader::new(file));
|
let data: ParserResult = parse(BufReader::new(file));
|
||||||
dbg!(data.meeting_name);
|
}
|
||||||
|
_ => panic!("Error File!"),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user