Explorar o código

fix merging static attributes

Evan Almloff hai 1 ano
pai
achega
561830d814
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      packages/rsx/src/ifmt.rs

+ 3 - 1
packages/rsx/src/ifmt.rs

@@ -47,7 +47,9 @@ impl IfmtInput {
     }
 
     pub fn is_static(&self) -> bool {
-        matches!(self.segments.as_slice(), &[Segment::Literal(_)] | &[])
+        self.segments
+            .iter()
+            .all(|seg| matches!(seg, Segment::Literal(_)))
     }
 }