Fix clippy warnings

main
Elnu 1 year ago
parent 37da862c9f
commit 4b61aef177

@ -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 {

Loading…
Cancel
Save