aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domrect.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-08-27 22:15:54 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2015-08-27 22:27:43 +0200
commit709d347872e37ab2358e057d24557b9977238ecd (patch)
tree89f726bf207325eea8a8ca316f6d77d8c88432cb /components/script/dom/domrect.rs
parent856fda7f2e3fe4abd6de247e8bdaf8cedf3764c2 (diff)
downloadservo-709d347872e37ab2358e057d24557b9977238ecd.tar.gz
servo-709d347872e37ab2358e057d24557b9977238ecd.zip
Make the traits for the IDL interfaces take &self
Diffstat (limited to 'components/script/dom/domrect.rs')
-rw-r--r--components/script/dom/domrect.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/domrect.rs b/components/script/dom/domrect.rs
index c2936217c94..b2b701e8fc1 100644
--- a/components/script/dom/domrect.rs
+++ b/components/script/dom/domrect.rs
@@ -40,35 +40,35 @@ impl DOMRect {
}
}
-impl<'a> DOMRectMethods for &'a DOMRect {
+impl DOMRectMethods for DOMRect {
// https://drafts.fxtf.org/geometry/#dom-domrectreadonly-top
- fn Top(self) -> Finite<f32> {
+ fn Top(&self) -> Finite<f32> {
Finite::wrap(self.top)
}
// https://drafts.fxtf.org/geometry/#dom-domrectreadonly-bottom
- fn Bottom(self) -> Finite<f32> {
+ fn Bottom(&self) -> Finite<f32> {
Finite::wrap(self.bottom)
}
// https://drafts.fxtf.org/geometry/#dom-domrectreadonly-left
- fn Left(self) -> Finite<f32> {
+ fn Left(&self) -> Finite<f32> {
Finite::wrap(self.left)
}
// https://drafts.fxtf.org/geometry/#dom-domrectreadonly-right
- fn Right(self) -> Finite<f32> {
+ fn Right(&self) -> Finite<f32> {
Finite::wrap(self.right)
}
// https://drafts.fxtf.org/geometry/#dom-domrectreadonly-width
- fn Width(self) -> Finite<f32> {
+ fn Width(&self) -> Finite<f32> {
let result = (self.right - self.left).abs();
Finite::wrap(result)
}
// https://drafts.fxtf.org/geometry/#dom-domrectreadonly-height
- fn Height(self) -> Finite<f32> {
+ fn Height(&self) -> Finite<f32> {
let result = (self.bottom - self.top).abs();
Finite::wrap(result)
}