diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-08-27 22:15:54 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-08-27 22:27:43 +0200 |
commit | 709d347872e37ab2358e057d24557b9977238ecd (patch) | |
tree | 89f726bf207325eea8a8ca316f6d77d8c88432cb /components/script/dom/domrect.rs | |
parent | 856fda7f2e3fe4abd6de247e8bdaf8cedf3764c2 (diff) | |
download | servo-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.rs | 14 |
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) } |