style: code style

This commit is contained in:
2020-07-26 14:59:30 +08:00
parent 10662a9e6e
commit 748fb8eca0

View File

@@ -62,22 +62,21 @@ fn main() -> std::io::Result<()> {
println!("Couldn't access files. Error {}", e); println!("Couldn't access files. Error {}", e);
Err(e).unwrap() Err(e).unwrap()
} }
} { }
{
let path = entry.unwrap(); let path = entry.unwrap();
let path = Path::new(&path).strip_prefix(env::current_dir().unwrap().to_str().unwrap()).unwrap(); let path = Path::new(&path).strip_prefix(env::current_dir().unwrap().to_str().unwrap()).unwrap();
if !path.starts_with("target/"){ if !path.starts_with("target/") {
let path = path.to_str().unwrap(); let path = path.to_str().unwrap();
//execute each parsers on the current file //execute each parsers on the current file
for p in &parsers { for p in &parsers {
p.parse(path); p.parse(path);
} }
} }
} }
Ok(()) Ok(())
} }
else{ else{
let mut tokens : Vec<Token> = Vec::new(); let mut tokens : Vec<Token> = Vec::new();