remove a warning

This commit is contained in:
bunnie 2021-07-29 00:15:06 +08:00
parent e10c80f370
commit 1424eca689
3 changed files with 3 additions and 3 deletions

View file

@ -86,6 +86,7 @@ exclude = [
"kernel",
"loader",
"utralib", # Exclude UTRA, since it is machine-generated.
"locales", # exclude because it is machine-generated
]
[profile.release]

View file

@ -1 +1 @@
lib.rs
generated.rs

View file

@ -119,7 +119,6 @@ fn generate_code(translations: Translations) -> proc_macro2::TokenStream {
}
quote! {
#![cfg_attr(target_os = "none", no_std)]
#[macro_export]
macro_rules! t {
#(#branches)*
@ -134,7 +133,7 @@ fn write_code(code: TokenStream) {
let mut dest = project_root();
dest.push("locales");
dest.push("src");
let mut output = File::create(&std::path::Path::new(&dest).join("lib.rs")).unwrap();
let mut output = File::create(&std::path::Path::new(&dest).join("generated.rs")).unwrap();
output
.write(code.to_string().as_bytes())
.expect("Cannot write generated i18n code");