toml_config_derive: fix clippy warning

This commit is contained in:
Joakim Frostegård 2024-01-20 10:43:39 +01:00
parent aeeeda1b2b
commit cbbfa9afef

View file

@ -146,8 +146,7 @@ fn extract_comment_string(attrs: Vec<Attribute>) -> TokenStream {
} }
for token_tree in attr.tokens { for token_tree in attr.tokens {
match token_tree { if let TokenTree::Literal(literal) = token_tree {
TokenTree::Literal(literal) => {
let mut comment = format!("{}", literal); let mut comment = format!("{}", literal);
// Strip leading and trailing quotation marks // Strip leading and trailing quotation marks
@ -160,8 +159,6 @@ fn extract_comment_string(attrs: Vec<Attribute>) -> TokenStream {
output.push_str(&comment); output.push_str(&comment);
output.push('\n'); output.push('\n');
} }
_ => {}
}
} }
} }