VectorCraft: An open-source, vector art tool written by scratch in pure Rust
eps: rustfmt the layer transparency change
bflatastic312a93964675
diff --git a/crates/eps/src/import/ai/read.rs b/crates/eps/src/import/ai/read.rsindex 3d9024fee..e892369f1 100644--- a/crates/eps/src/import/ai/read.rs+++ b/crates/eps/src/import/ai/read.rs@@ -1500,8 +1500,8 @@ impl<'a> Reader<'a> {// After a layer's art and before its `LB`: the layer's own state (#2003). Kept until// an operator that isn't part of the state block (or the `LB` that takes it) says the// art moves on, so a path's state before its paint isn't read as its layer's.- self.layer_state = matches!(self.frames.last(), Some(Frame { kind: Kind::Layer(_), .. }))- .then_some((gs.opacity, gs.blend, gs.isolate, gs.knockout));+ self.layer_state =+ matches!(self.frames.last(), Some(Frame { kind: Kind::Layer(_), .. })).then_some((gs.opacity, gs.blend, gs.isolate, gs.knockout));}}diff --git a/crates/eps/src/import/ai/tests.rs b/crates/eps/src/import/ai/tests.rsindex 3b7c0e414..aa482aaa3 100644--- a/crates/eps/src/import/ai/tests.rs+++ b/crates/eps/src/import/ai/tests.rs@@ -315,10 +315,7 @@ fn a_layer_keeps_its_own_transparency() {// The art inside keeps its own state.assert_eq!(art(&doc)[0].opacity, 1.0);// A layer whose last object is a group keeps that group's state apart from the layer's.- let art_ = format!(- "0 Ae\nu\n0 0.5 0 0 0 Xy\n{}f\nU\n0 0 Xd\n6 () XW\n",- rect_path(0.0, 0.0, 10.0, 10.0)- );+ let art_ = format!("0 Ae\nu\n0 0.5 0 0 0 Xy\n{}f\nU\n0 0 Xd\n6 () XW\n", rect_path(0.0, 0.0, 10.0, 10.0));let doc = read_ok(&layer(&art_)).doc;assert_eq!(doc.layers[0].opacity, 1.0, "no layer state written: the layer stays opaque");assert_eq!(art(&doc)[0].opacity, 0.5, "the group's own state");