summaryrefslogtreecommitdiff
path: root/src/geom/length.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-08-21 16:38:51 +0200
committerLaurenz <laurmaedje@gmail.com>2021-08-21 17:30:21 +0200
commit0dd4ae0a7ac0c247078df492469ff20b8a90c886 (patch)
tree07a55343b9ccab3fe76b0f1b0de9d1be310d8b14 /src/geom/length.rs
parentf38eb10c2b54bd13ccef119454839f6a66448462 (diff)
Prune derives
Diffstat (limited to 'src/geom/length.rs')
-rw-r--r--src/geom/length.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/geom/length.rs b/src/geom/length.rs
index 343b523c..3510fa6f 100644
--- a/src/geom/length.rs
+++ b/src/geom/length.rs
@@ -126,6 +126,13 @@ impl Length {
}
}
+impl Debug for Length {
+ fn fmt(&self, f: &mut Formatter) -> fmt::Result {
+ let unit = LengthUnit::Pt;
+ write!(f, "{}{}", self.to_unit(unit), unit)
+ }
+}
+
impl Display for Length {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
use LengthUnit::*;
@@ -142,13 +149,6 @@ impl Display for Length {
}
}
-impl Debug for Length {
- fn fmt(&self, f: &mut Formatter) -> fmt::Result {
- let unit = LengthUnit::Pt;
- write!(f, "{}{}", self.to_unit(unit), unit)
- }
-}
-
impl Neg for Length {
type Output = Self;
@@ -217,7 +217,7 @@ impl<'a> Sum<&'a Length> for Length {
}
/// Different units of length measurement.
-#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum LengthUnit {
/// Points.
Pt,