瀏覽代碼

fix merging static attributes

Evan Almloff 1 年之前
父節點
當前提交
561830d814
共有 1 個文件被更改,包括 3 次插入1 次删除
  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 {
     pub fn is_static(&self) -> bool {
-        matches!(self.segments.as_slice(), &[Segment::Literal(_)] | &[])
+        self.segments
+            .iter()
+            .all(|seg| matches!(seg, Segment::Literal(_)))
     }
     }
 }
 }