Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: ty <[email protected]>
  • Loading branch information
isnakode and togami2864 committed Apr 20, 2024
1 parent 5475727 commit a4a5d10
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ impl Rule for NoDuplicateSelectorsKeyframeBlock {
for keyframe_item in node.items() {
match keyframe_item {
AnyCssKeyframesItem::CssKeyframesItem(item) => {
let keyframe_selector = item.selectors().into_iter().next()?;
let keyframe_selector = keyframe_selector.ok()?;
let keyframe_selector = item.selectors().into_iter().next()?.ok()?;
if !selector_list.insert(keyframe_selector.text().to_lowercase()) {
return Some(keyframe_selector);
}
Expand All @@ -76,7 +75,7 @@ impl Rule for NoDuplicateSelectorsKeyframeBlock {
},
)
.note(markup! {
"Consider using different selector here!"
"Consider using a different percentage value or keyword to avoid duplication"
}),
)
}
Expand Down

0 comments on commit a4a5d10

Please sign in to comment.