aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/util/geometry.rs
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2013-10-31 16:34:14 -0700
committerbors-servo <release+servo@mozilla.com>2013-10-31 16:34:14 -0700
commit352acbb8335fcf78f2d62dc781fa9d86b9368f9c (patch)
treec27c2d41cbffc19415b4d183367568ff1682b688 /src/components/util/geometry.rs
parent041f3a8b06e3f29e99464af752cad8f1a7e93540 (diff)
parentaaf96b600363ec6d2a4d23cf318b47d9bbb743b5 (diff)
downloadservo-352acbb8335fcf78f2d62dc781fa9d86b9368f9c.tar.gz
servo-352acbb8335fcf78f2d62dc781fa9d86b9368f9c.zip
auto merge of #1163 : metajack/servo/kmc-rust-upgrade, r=kmcallister
Most work courtesy of @kmcallister. I already reviewed Keegan's work, so just the last two commits need attention.
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 {