Make the traits for the IDL interfaces take &self

This commit is contained in:
Anthony Ramine 2015-08-27 22:15:54 +02:00
parent 856fda7f2e
commit 709d347872
99 changed files with 1192 additions and 1192 deletions

View file

@ -40,49 +40,49 @@ impl DOMPointReadOnly {
}
}
impl<'a> DOMPointReadOnlyMethods for &'a DOMPointReadOnly {
impl DOMPointReadOnlyMethods for DOMPointReadOnly {
// https://dev.w3.org/fxtf/geometry/Overview.html#dom-dompointreadonly-x
fn X(self) -> f64 {
fn X(&self) -> f64 {
self.x.get()
}
// https://dev.w3.org/fxtf/geometry/Overview.html#dom-dompointreadonly-y
fn Y(self) -> f64 {
fn Y(&self) -> f64 {
self.y.get()
}
// https://dev.w3.org/fxtf/geometry/Overview.html#dom-dompointreadonly-z
fn Z(self) -> f64 {
fn Z(&self) -> f64 {
self.z.get()
}
// https://dev.w3.org/fxtf/geometry/Overview.html#dom-dompointreadonly-w
fn W(self) -> f64 {
fn W(&self) -> f64 {
self.w.get()
}
}
pub trait DOMPointWriteMethods {
fn SetX(self, value: f64);
fn SetY(self, value: f64);
fn SetZ(self, value: f64);
fn SetW(self, value: f64);
fn SetX(&self, value: f64);
fn SetY(&self, value: f64);
fn SetZ(&self, value: f64);
fn SetW(&self, value: f64);
}
impl<'a> DOMPointWriteMethods for &'a DOMPointReadOnly {
fn SetX(self, value: f64) {
impl DOMPointWriteMethods for DOMPointReadOnly {
fn SetX(&self, value: f64) {
self.x.set(value);
}
fn SetY(self, value: f64) {
fn SetY(&self, value: f64) {
self.y.set(value);
}
fn SetZ(self, value: f64) {
fn SetZ(&self, value: f64) {
self.z.set(value);
}
fn SetW(self, value: f64) {
fn SetW(&self, value: f64) {
self.w.set(value);
}
}