Skip to content

Commit

Permalink
Fix Clippy warning (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-fairy authored Aug 17, 2021
1 parent ba9c7b5 commit 9a2c4fb
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions maud_macros/src/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,16 @@ fn desugar_attrs(attrs: Vec<Attr>) -> Vec<Attribute> {
let mut attributes = vec![];
for attr in attrs {
match attr {
Attr::Class { name, toggler, .. } => {
if let Some(toggler) = toggler {
classes_toggled.push((name, toggler));
} else {
classes_static.push(name);
}
}
Attr::Class {
name,
toggler: Some(toggler),
..
} => classes_toggled.push((name, toggler)),
Attr::Class {
name,
toggler: None,
..
} => classes_static.push(name),
Attr::Id { name, .. } => ids.push(name),
Attr::Attribute { attribute } => attributes.push(attribute),
}
Expand Down

0 comments on commit 9a2c4fb

Please sign in to comment.