VectorCraft: An open-source, vector art tool written by scratch in pure Rust
Format with rustfmt
Dylan M. Taylor9086842f4b1e
diff --git a/crates/engine/src/cmd/fileio/affinity/master_copies.rs b/crates/engine/src/cmd/fileio/affinity/master_copies.rsindex 789f3c774..f0ab8bd40 100644--- a/crates/engine/src/cmd/fileio/affinity/master_copies.rs+++ b/crates/engine/src/cmd/fileio/affinity/master_copies.rs@@ -47,10 +47,8 @@ pub(super) fn copy_cost(n: &af::Node, depth: usize) -> CopyCost {_ => CopyCost { work: 1, pixels: 0 },};// A vector mask is a path of its own, and a pixel mask an image of its own, in every copy.- let mask = CopyCost {- work: n.mask.as_ref().map_or(0, segments) + u64::from(n.pixel_mask.is_some()),- pixels: n.pixel_mask.as_ref().map_or(0, pixels),- };+ let mask =+ CopyCost { work: n.mask.as_ref().map_or(0, segments) + u64::from(n.pixel_mask.is_some()), pixels: n.pixel_mask.as_ref().map_or(0, pixels) };n.children.iter().fold(own.plus(mask), |c, ch| c.plus(copy_cost(ch, depth + 1)))}