From b7401b9562792f3c9019609b9302b4d77ff31037 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 18 Aug 2014 22:33:38 +0100 Subject: [PATCH] Only write the px value in Show for Au The integer Au value is mostly internal and does not make much sense. Printing both values is very verbose and hurts readability of debug logs. --- src/components/util/geometry.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/util/geometry.rs b/src/components/util/geometry.rs index 70882f17178..2b1082fa3d2 100644 --- a/src/components/util/geometry.rs +++ b/src/components/util/geometry.rs @@ -79,8 +79,7 @@ impl Default for Au { impl fmt::Show for Au { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let Au(n) = *self; - write!(f, "Au(au={} px={})", n, to_frac_px(*self)) + write!(f, "{}px", to_frac_px(*self)) }} impl Add for Au {