fix(dxf): resolve strict Clippy findings without weakening checks

Remove an unused private Interval helper and collapse the copied-vertex
guard to an equivalent let-chain with identical evaluation order and error.
Preserve all 28 geometry and 10 bounds tests, limits and assertions.

The prior a7f3c78b development attempt stopped at Clippy; IO/engine tests
and wasm were not reached. Both corrective hunks were source-reviewed,
and normal formatting passed. Tests for this new source remain unrun.
This commit is contained in:
lillith
2026-10-29 02:59:05 +01:00
parent a7f3c78b07
commit 6b39ee3686
2 changed files with 5 additions and 8 deletions
@@ -37,10 +37,6 @@ impl Interval {
Self::checked(value, value)
}
fn is(self, value: f64) -> bool {
self.lo == value && self.hi == value
}
fn rounded(value: f64) -> Result<Self> {
if value == 0.0 || !value.is_normal() {
return Err(invalid("support arithmetic overflow or underflow"));
+5 -4
View File
@@ -242,10 +242,11 @@ fn transformed_shape(shape: &DxfShape, scale: f64, translation: Vec2) -> Result<
let mut previous: Option<(Vec2, Vec2)> = None;
for vertex in vertices {
let at = transformed_point(vertex.at, scale, translation)?;
if let Some((old, last)) = previous {
if old != vertex.at && last == at {
return Err(invalid("DXF transform collapses adjacent distinct bulged vertices"));
}
if let Some((old, last)) = previous
&& old != vertex.at
&& last == at
{
return Err(invalid("DXF transform collapses adjacent distinct bulged vertices"));
}
copied.push(DxfVertex { at, bulge: vertex.bulge });
previous = Some((vertex.at, at));