~repos /rust-embed

#rust#proc-macro#http

git clone https://pyrossh.dev/repos/rust-embed.git

rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.


5144db96 pyros2097

7 years ago
Merge pull request #12 from Mcat12/fix/log-macro-usage
Files changed (1) hide show
  1. src/lib.rs +3 -3
src/lib.rs CHANGED
@@ -25,11 +25,11 @@ fn generate_assets(ident: &syn::Ident, folder_path: String) -> quote::Tokens {
25
25
  let name = &format!("{}{}", folder_path, file_path);
26
26
  let path = &Path::new(name);
27
27
  let key = String::from(path.to_str().expect("Path does not have a string representation"));
28
- info!("file: {}", key);
28
+ println!("file: {}", key);
29
29
  let mut file = match File::open(path) {
30
30
  Ok(mut file) => file,
31
31
  Err(e) => {
32
- error!("file: {} {}", key, e);
32
+ eprintln!("file: {} {}", key, e);
33
33
  return None
34
34
  }
35
35
  };
@@ -37,7 +37,7 @@ fn generate_assets(ident: &syn::Ident, folder_path: String) -> quote::Tokens {
37
37
  match file.read_to_end(&mut data) {
38
38
  Ok(_) => Some(data),
39
39
  Err(e) => {
40
- error!("file: {} {}", key, e);
40
+ eprintln!("file: {} {}", key, e);
41
41
  return None
42
42
  }
43
43
  }