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.
This commit is contained in:
Simon Sapin 2014-08-18 22:33:38 +01:00
parent 578c14e7b6
commit b7401b9562

View file

@ -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<Au,Au> for Au {