Skip to content

Commit b50a064

Browse files
chore(stackable-versioned): Use named format arguments
Co-authored-by: Nick <[email protected]>
1 parent f65261e commit b50a064

File tree

1 file changed

+10
-3
lines changed
  • crates/stackable-versioned-macros/src/utils

1 file changed

+10
-3
lines changed

crates/stackable-versioned-macros/src/utils/mod.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ impl ContainerIdentExt for Ident {
4141
}
4242

4343
fn as_parameter_ident(&self) -> IdentString {
44-
let ident = format_ident!("__sv_{}", self.to_string().to_lowercase());
44+
let ident = format_ident!(
45+
"__sv_{lowercase_ident}",
46+
lowercase_ident = self.to_string().to_lowercase()
47+
);
4548
IdentString::new(ident)
4649
}
4750
}
@@ -79,7 +82,11 @@ pub trait ItemIdentExt {
7982

8083
impl ItemIdentExt for IdentString {
8184
fn json_path_ident(&self) -> IdentString {
82-
format_ident!("__sv_{}_path", self.as_str().to_lowercase()).into()
85+
format_ident!(
86+
"__sv_{lowercase_ident}_path",
87+
lowercase_ident = self.as_str().to_lowercase()
88+
)
89+
.into()
8390
}
8491
}
8592

@@ -92,7 +99,7 @@ pub fn path_to_string(path: &Path) -> String {
9299
.join("::");
93100

94101
match path.leading_colon {
95-
Some(_) => format!("::{}", pretty_path),
102+
Some(_) => format!("::{pretty_path}"),
96103
None => pretty_path,
97104
}
98105
}

0 commit comments

Comments
 (0)