Skip to content

Commit

Permalink
use short code
Browse files Browse the repository at this point in the history
  • Loading branch information
ZibanPirate committed Feb 16, 2025
1 parent ceda676 commit 5292dd4
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 201 deletions.
4 changes: 2 additions & 2 deletions rust/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mod r#static {
Some((_, info)) => {
let path = dir.as_ref().display().to_string();
let path = path.split("_data/").last().unwrap_or(&path);
let code = path.replace('/', "_").to_uppercase();
let code = path.split('/').last().unwrap_or(path).to_uppercase();

format!(
r#"const {}: Node = Node {{
Expand All @@ -38,7 +38,7 @@ mod r#static {
r#type: {},
}};
"#,
code,
path.replace('/', "_").to_uppercase(),
code,
info.get("name").unwrap().get("en").unwrap(),
info.get("name").unwrap().get("ar").unwrap(),
Expand Down
Loading

0 comments on commit 5292dd4

Please sign in to comment.