Skip to content

Commit 6058e0d

Browse files
committed
fix: fix clippy warnings
1 parent ac227b8 commit 6058e0d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

macros/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pub fn match_byte(input: TokenStream) -> TokenStream {
162162
for (i, ref arm) in arms.iter().enumerate() {
163163
let case_id = i + 1;
164164
let index = case_id as isize;
165-
let name = syn::Ident::new(&format!("Case{}", case_id), arm.span());
165+
let name = syn::Ident::new(&format!("Case{case_id}"), arm.span());
166166
let pat = &arm.pat;
167167
parse_pat_to_table(pat, case_id as u8, &mut wildcard, &mut table);
168168

@@ -177,7 +177,7 @@ pub fn match_byte(input: TokenStream) -> TokenStream {
177177

178178
let mut table_content = Vec::new();
179179
for entry in table.iter() {
180-
let name: syn::Path = syn::parse_str(&format!("Case::Case{}", entry)).unwrap();
180+
let name: syn::Path = syn::parse_str(&format!("Case::Case{entry}")).unwrap();
181181
table_content.push(name);
182182
}
183183
let table = quote::quote!(static __CASES: [Case; 256] = [#(#table_content),*];);

src/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ impl fmt::Display for BasicParseErrorKind<'_> {
8080
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8181
match self {
8282
BasicParseErrorKind::UnexpectedToken(token) => {
83-
write!(f, "unexpected token: {:?}", token)
83+
write!(f, "unexpected token: {token:?}")
8484
}
8585
BasicParseErrorKind::EndOfInput => write!(f, "unexpected end of input"),
8686
BasicParseErrorKind::AtRuleInvalid(rule) => {
87-
write!(f, "invalid @ rule encountered: '@{}'", rule)
87+
write!(f, "invalid @ rule encountered: '@{rule}'")
8888
}
8989
BasicParseErrorKind::AtRuleBodyInvalid => write!(f, "invalid @ rule body encountered"),
9090
BasicParseErrorKind::QualifiedRuleInvalid => {

0 commit comments

Comments
 (0)