Procházet zdrojové kódy

fix merging static attributes

Evan Almloff před 1 rokem
rodič
revize
561830d814
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  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(_)))
     }
 }