Skip to content

Commit

Permalink
Merge pull request #12 from Mcat12/fix/log-macro-usage
Browse files Browse the repository at this point in the history
Use standard logging in debug mode
  • Loading branch information
pyros2097 committed May 17, 2018
2 parents 693408d + 7b5bbdb commit 5144db9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Expand Up @@ -25,19 +25,19 @@ fn generate_assets(ident: &syn::Ident, folder_path: String) -> quote::Tokens {
let name = &format!("{}{}", folder_path, file_path);
let path = &Path::new(name);
let key = String::from(path.to_str().expect("Path does not have a string representation"));
info!("file: {}", key);
println!("file: {}", key);
let mut file = match File::open(path) {
Ok(mut file) => file,
Err(e) => {
error!("file: {} {}", key, e);
eprintln!("file: {} {}", key, e);
return None
}
};
let mut data: Vec<u8> = Vec::new();
match file.read_to_end(&mut data) {
Ok(_) => Some(data),
Err(e) => {
error!("file: {} {}", key, e);
eprintln!("file: {} {}", key, e);
return None
}
}
Expand Down

0 comments on commit 5144db9

Please sign in to comment.