Skip to content

Commit 343ed21

Browse files
authored
fix(sol-macro-gen): correct identifier check in write_mod_name (foundry-rs#13508)
1 parent 3ff215f commit 343ed21

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/sol-macro-gen/src/sol_macro_gen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ edition = "2021"
391391
}
392392

393393
fn write_mod_name(contents: &mut String, name: &str) -> Result<()> {
394-
if syn::parse_str::<syn::Ident>(&format!("pub mod {name};")).is_ok() {
394+
if syn::parse_str::<syn::Ident>(name).is_ok() {
395395
write!(contents, "pub mod {name};")?;
396396
} else {
397397
write!(contents, "pub mod r#{name};")?;

0 commit comments

Comments
 (0)