This commit is contained in:
Adrian Heine 2019-05-03 23:23:12 +02:00
parent abb6947853
commit ed9e29b8b8
8 changed files with 279 additions and 25 deletions

View file

@ -19,6 +19,6 @@ pub fn create_static_output_files(source_dir: &str) {
let mut buffer = String::new();
File::open(file_path.clone()).unwrap().read_to_string(&mut buffer).unwrap();
let fence = buffer.chars().filter(|c| *c == '#').collect::<String>() + "#";
f.write_all(format!("pub const {}: &'static str = r{1}\"{2}\"{1};\n", get_const_name(&file_path), fence, buffer).as_bytes()).unwrap();
f.write_all(format!("pub const {}: &str = r{1}\"{2}\"{1};\n", get_const_name(&file_path), fence, buffer).as_bytes()).unwrap();
}
}