aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/util/geometry.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/util/geometry.rs')
-rw-r--r--src/components/util/geometry.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/util/geometry.rs b/src/components/util/geometry.rs
index febb33660f4..ed0dcd5c420 100644
--- a/src/components/util/geometry.rs
+++ b/src/components/util/geometry.rs
@@ -7,6 +7,7 @@ use geom::rect::Rect;
use geom::size::Size2D;
use std::num::{NumCast, One, Zero};
+use std::fmt;
pub struct Au(i32);
@@ -18,6 +19,12 @@ impl Clone for Au {
}
}
+impl fmt::Default for Au {
+ fn fmt(obj: &Au, f: &mut fmt::Formatter) {
+ write!(f.buf, "Au({})", *obj);
+ }
+}
+
impl Eq for Au {
#[inline]
fn eq(&self, other: &Au) -> bool {