Skip to content

Commit ea8e270

Browse files
committed
Fixed the clippy::uninlined_format_args lint
1 parent 7be4521 commit ea8e270

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

const-type-layout-derive/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,9 @@ fn quote_fields(
452452

453453
let ident = syn::Ident::new(
454454
&(if let Some(qualifier) = qualifier {
455-
format!("__{}_{}_fields", ty_name, qualifier)
455+
format!("__{ty_name}_{qualifier}_fields")
456456
} else {
457-
format!("__{}_fields", ty_name)
457+
format!("__{ty_name}_fields")
458458
})
459459
.to_uppercase(),
460460
ty_name.span(),
@@ -681,7 +681,7 @@ fn quote_discriminant_bytes(
681681
consts: &mut Vec<proc_macro2::TokenStream>,
682682
) -> proc_macro2::TokenStream {
683683
let ident = syn::Ident::new(
684-
&format!("__{}_{}_discriminant", ty_name, variant_name).to_uppercase(),
684+
&format!("__{ty_name}_{variant_name}_discriminant").to_uppercase(),
685685
ty_name.span(),
686686
);
687687

@@ -722,7 +722,7 @@ fn quote_variants(
722722
let variants_len = variants.len();
723723

724724
let ident = syn::Ident::new(
725-
&format!("__{}_variants", ty_name).to_uppercase(),
725+
&format!("__{ty_name}_variants").to_uppercase(),
726726
ty_name.span(),
727727
);
728728

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ impl<'a> fmt::Debug for Discriminant<'a> {
441441
if byte != 0_u8 {
442442
is_zero = false;
443443

444-
write!(fmt, "{:x}", byte)?;
444+
write!(fmt, "{byte:x}")?;
445445
}
446446
}
447447

try-crate/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ fn main() {
110110
let part: Vec<u8> = std::ascii::escape_default(b).collect();
111111
ascii_escaped_layout.push_str(std::str::from_utf8(&part).unwrap());
112112
}
113-
println!("{}", ascii_escaped_layout);
113+
println!("{ascii_escaped_layout}");
114114

115115
let ron_layout = ron::to_string(&<List<u8>>::TYPE_GRAPH).unwrap();
116-
println!("{}", ron_layout);
116+
println!("{ron_layout}");
117117
}
118118

119119
const SERIALISED_LIST_U8_LAYOUT: [u8; const_type_layout::serialised_type_graph_len::<List<u8>>()] =

0 commit comments

Comments
 (0)