diff --git a/dyesub-tool/src/svg/measure.rs b/dyesub-tool/src/svg/measure.rs index 1fb1398..f16b4b4 100644 --- a/dyesub-tool/src/svg/measure.rs +++ b/dyesub-tool/src/svg/measure.rs @@ -25,7 +25,7 @@ impl Display for SVGMeasure { impl Add for SVGMeasure { type Output = Self; - fn add(self, other: SVGMeasure) -> SVGMeasure { + fn add(self, other: Self) -> Self { SVGMeasure::new(self.measure + other.measure, self.unit) } } @@ -33,7 +33,7 @@ impl Add for SVGMeasure { impl Sub for SVGMeasure { type Output = Self; - fn sub(self, other: SVGMeasure) -> SVGMeasure { + fn sub(self, other: Self) -> Self { SVGMeasure::new(self.measure - other.measure, self.unit) } } @@ -41,7 +41,7 @@ impl Sub for SVGMeasure { impl Mul for SVGMeasure { type Output = Self; - fn mul(self, scalar: f64) -> SVGMeasure { + fn mul(self, scalar: f64) -> Self { SVGMeasure::new(self.measure * scalar, self.unit) } } @@ -49,7 +49,7 @@ impl Mul for SVGMeasure { impl Div for SVGMeasure { type Output = Self; - fn div(self, scalar: f64) -> SVGMeasure { + fn div(self, scalar: f64) -> Self { SVGMeasure::new(self.measure / scalar, self.unit) } }