From 4b61aef177de4accc4020359adce566376f01e18 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Mon, 14 Aug 2023 13:59:47 -0700 Subject: [PATCH] Fix clippy warnings --- dyesub-tool/src/svg/measure.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dyesub-tool/src/svg/measure.rs b/dyesub-tool/src/svg/measure.rs index 763e147..fd59c9f 100644 --- a/dyesub-tool/src/svg/measure.rs +++ b/dyesub-tool/src/svg/measure.rs @@ -23,11 +23,11 @@ impl SVGMeasure { Self { measure, unit } } - fn to_user_units(&self) -> f64 { + fn to_user_units(self) -> f64 { self.measure * self.unit.to_user_units() } - fn to_unit(&self, unit: SVGUnit) -> Self { + fn to_unit(self, unit: SVGUnit) -> Self { SVGMeasure { measure: self.to_user_units() / unit.to_user_units(), unit, @@ -67,10 +67,6 @@ impl PartialEq for SVGMeasure { fn eq(&self, other: &Self) -> bool { (self.to_user_units() - other.to_user_units()).abs() < EQ_TOLERANCE } - - fn ne(&self, other: &Self) -> bool { - (self.to_user_units() - other.to_user_units()).abs() > EQ_TOLERANCE - } } impl PartialOrd for SVGMeasure {