mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix all clippy warnings in style_derive
This commit is contained in:
parent
d5c1690cb4
commit
dd301c084d
4 changed files with 12 additions and 14 deletions
|
@ -36,7 +36,7 @@ pub fn derive(input: DeriveInput) -> TokenStream {
|
|||
let identifier = cg::to_css_identifier(
|
||||
&css_variant_attrs
|
||||
.keyword
|
||||
.unwrap_or(variant.ast().ident.to_string()),
|
||||
.unwrap_or_else(|| variant.ast().ident.to_string()),
|
||||
);
|
||||
let ident = &variant.ast().ident;
|
||||
|
||||
|
@ -56,7 +56,7 @@ pub fn derive(input: DeriveInput) -> TokenStream {
|
|||
None => return body,
|
||||
};
|
||||
|
||||
for alias in aliases.split(",") {
|
||||
for alias in aliases.split(',') {
|
||||
body = quote! {
|
||||
#body
|
||||
#alias #condition => Ok(#name::#ident),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue