Skip to content

Commit c81e2ac

Browse files
committed
Fix lint
1 parent b6b2fed commit c81e2ac

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

libs/extractor/src/extractor/extract_global_style_from_expression.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,8 @@ pub fn extract_global_style_from_expression<'a>(
144144
&mut o.value,
145145
0,
146146
&Some(StyleSelector::Global(
147-
if name.starts_with("_") {
148-
StyleSelector::from(&name[1..])
149-
.to_string()
150-
.replace("&", "*")
147+
if let Some(name) = name.strip_prefix("_") {
148+
StyleSelector::from(name).to_string().replace("&", "*")
151149
} else {
152150
name.to_string()
153151
},

0 commit comments

Comments
 (0)