From 3cd71b120ffaab03c51b39ec74edd1852dc384fa Mon Sep 17 00:00:00 2001 From: Constantin Date: Wed, 24 Jan 2024 20:17:04 +0100 Subject: [PATCH] Names update --- agb-image-converter/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/agb-image-converter/src/lib.rs b/agb-image-converter/src/lib.rs index 8511f387..f1d6f32e 100644 --- a/agb-image-converter/src/lib.rs +++ b/agb-image-converter/src/lib.rs @@ -44,7 +44,7 @@ impl config::Image for BackgroundGfxOption { fn filename(&self) -> String { self.file_name .clone() - .replace(OUT_DIR, &get_out_dir(&self.file_name)) + .replace(OUT_DIR_TOKEN, &get_out_dir(&self.file_name)) } fn colours(&self) -> Colours { @@ -295,7 +295,7 @@ pub fn include_colours_inner(input: TokenStream) -> TokenStream { #[proc_macro] pub fn include_aseprite_inner(input: TokenStream) -> TokenStream { - let out_dir = get_out_dir(&input.to_string()); + let out_dir_path = get_out_dir(&input.to_string()); let parser = Punctuated::::parse_terminated; let parsed = match parser.parse(input) { @@ -314,7 +314,7 @@ pub fn include_aseprite_inner(input: TokenStream) -> TokenStream { let filenames: Vec = parsed .iter() .map(|s| s.value()) - .map(|s| s.replace(OUT_DIR, &out_dir)) + .map(|s| s.replace(OUT_DIR_TOKEN, &out_dir_path)) .map(|s| Path::new(&root).join(&*s)) .collect(); @@ -668,10 +668,10 @@ fn valid_sprite_size(width: u32, height: u32) -> bool { } } -const OUT_DIR: &str = "$OUT_DIR"; +const OUT_DIR_TOKEN: &str = "$OUT_DIR"; fn get_out_dir(raw_input: &str) -> String { - if raw_input.contains(OUT_DIR) { + if raw_input.contains(OUT_DIR_TOKEN) { std::env::var("OUT_DIR").expect("Failed to get OUT_DIR") } else { String::new()