Skip to content

Commit 34c554f

Browse files
authored
Fix clippy::uninlined_format_args (#1186)
1 parent a5b54bb commit 34c554f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

fiat-constify/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
7373
fn get_ident_from_pat(pat: &Pat) -> Ident {
7474
match pat {
7575
Pat::Ident(pat_ident) => pat_ident.ident.clone(),
76-
other => panic!("unexpected `Pat`: {:?} (expecting `Pat::Ident`)", other),
76+
other => panic!("unexpected `Pat`: {other:?} (expecting `Pat::Ident`)"),
7777
}
7878
}
7979

wycheproof2blb/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ fn main() {
137137
file: "ecdsa_secp521r1_sha512_test.json",
138138
generator: ecdsa::generator,
139139
},
140-
_ => panic!("Unrecognized algorithm '{}'", algorithm),
140+
_ => panic!("Unrecognized algorithm '{algorithm}'"),
141141
};
142142

143143
let data = wycheproof::data(wycheproof_dir, algo.file);

wycheproof2blb/src/wycheproof.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pub fn data(wycheproof_dir: &str, filename: &str) -> Vec<u8> {
111111
.join("testvectors")
112112
.join(filename);
113113
std::fs::read(&path)
114-
.unwrap_or_else(|_| panic!("Test vector file {} not found at {:?}", filename, path))
114+
.unwrap_or_else(|_| panic!("Test vector file {filename} not found at {path:?}"))
115115
}
116116

117117
/// Build a description for a test case in a suite

zeroize_derive/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ impl ZeroizeAttrs {
201201
}
202202
}
203203
}
204-
Data::Union(union_) => panic!("Unsupported untagged union {:?}", union_),
204+
Data::Union(union_) => panic!("Unsupported untagged union {union_:?}"),
205205
}
206206

207207
result.auto_params = bound_accumulator.params;
@@ -223,7 +223,7 @@ impl ZeroizeAttrs {
223223

224224
for meta in attr
225225
.parse_args_with(Punctuated::<Meta, Comma>::parse_terminated)
226-
.unwrap_or_else(|e| panic!("error parsing attribute: {:?} ({})", attr, e))
226+
.unwrap_or_else(|e| panic!("error parsing attribute: {attr:?} ({e})"))
227227
{
228228
self.parse_meta(&meta, variant, binding);
229229
}
@@ -289,7 +289,7 @@ impl ZeroizeAttrs {
289289
self.bound = Some(Bounds(Punctuated::new()));
290290
} else {
291291
self.bound = Some(lit.parse().unwrap_or_else(|e| {
292-
panic!("error parsing bounds: {:?} ({})", lit, e)
292+
panic!("error parsing bounds: {lit:?} ({e})")
293293
}));
294294
}
295295

@@ -343,7 +343,7 @@ fn generate_fields(input: &DeriveInput, method: TokenStream) -> TokenStream {
343343
})
344344
.collect(),
345345
Data::Struct(ref struct_) => vec![(quote! { #input_id }, &struct_.fields)],
346-
Data::Union(ref union_) => panic!("Cannot generate fields for untagged union {:?}", union_),
346+
Data::Union(ref union_) => panic!("Cannot generate fields for untagged union {union_:?}"),
347347
};
348348

349349
let arms = fields.into_iter().map(|(name, fields)| {
@@ -396,7 +396,7 @@ fn attr_skip(attrs: &[Attribute]) -> bool {
396396
if list.path.is_ident(ZEROIZE_ATTR) {
397397
for meta in list
398398
.parse_args_with(Punctuated::<Meta, Comma>::parse_terminated)
399-
.unwrap_or_else(|e| panic!("error parsing attribute: {:?} ({})", list, e))
399+
.unwrap_or_else(|e| panic!("error parsing attribute: {list:?} ({e})"))
400400
{
401401
if let Meta::Path(path) = meta {
402402
if path.is_ident("skip") {

0 commit comments

Comments
 (0)