Skip to content

VectorCraft: An open-source, vector art tool written by scratch in pure Rust

fmt (#2983)

bflatasticbb32072be929
diff --git a/crates/tools/src/draw2/curvature.rs b/crates/tools/src/draw2/curvature.rs
index 93d65e074..d2503be65 100644
--- a/crates/tools/src/draw2/curvature.rs
+++ b/crates/tools/src/draw2/curvature.rs
@@ -599,10 +599,7 @@ impl Tool for CurvatureTool {
tail.to_bezpath_into(&mut bp);
o.push(Overlay::Path { path: bp, color: FEEDBACK, width: 1.0, dashed: false });
if cx.measurement_labels && e.p.distance(h) > 1e-9 {
- o.push(Overlay::Measure {
- p: h + Vec2::new(cx.tol(12.0), cx.tol(12.0)),
- text: cx.segment_measure_label(e.p, h),
- });
+ o.push(Overlay::Measure { p: h + Vec2::new(cx.tol(12.0), cx.tol(12.0)), text: cx.segment_measure_label(e.p, h) });
}
}
return o;
@@ -619,10 +616,7 @@ impl Tool for CurvatureTool {
&& cx.measurement_labels
&& from.distance(h) > 1e-9
{
- o.push(Overlay::Measure {
- p: h + Vec2::new(cx.tol(12.0), cx.tol(12.0)),
- text: cx.segment_measure_label(*from, h),
- });
+ o.push(Overlay::Measure { p: h + Vec2::new(cx.tol(12.0), cx.tol(12.0)), text: cx.segment_measure_label(*from, h) });
}
}
for (i, (p, _)) in self.pts.iter().enumerate() {
diff --git a/crates/tools/src/pen.rs b/crates/tools/src/pen.rs
index 1f2483c8a..e1a8eccf5 100644
--- a/crates/tools/src/pen.rs
+++ b/crates/tools/src/pen.rs
@@ -397,10 +397,7 @@ impl Tool for PenTool {
}
o.push(Overlay::Path { path: bp, color: cx.doc.layer_color(id), width: 1.0, dashed: false });
if cx.measurement_labels && last.distance(h) > 1e-9 {
- o.push(Overlay::Measure {
- p: h + Vec2::new(cx.tol(12.0), cx.tol(12.0)),
- text: cx.segment_measure_label(last, h),
- });
+ o.push(Overlay::Measure { p: h + Vec2::new(cx.tol(12.0), cx.tol(12.0)), text: cx.segment_measure_label(last, h) });
}
}
o.extend_from_slice(self.snap.guides());