aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domexception.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/domexception.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/domexception.rs')
-rw-r--r--components/script/dom/domexception.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/domexception.rs b/components/script/dom/domexception.rs
index 6bf97a457fc..fdc4257a40d 100644
--- a/components/script/dom/domexception.rs
+++ b/components/script/dom/domexception.rs
@@ -59,9 +59,9 @@ impl DOMException {
}
}
-impl<'a> DOMExceptionMethods for &'a DOMException {
+impl DOMExceptionMethods for DOMException {
// https://heycam.github.io/webidl/#dfn-DOMException
- fn Code(self) -> u16 {
+ fn Code(&self) -> u16 {
match self.code {
// https://heycam.github.io/webidl/#dfn-throw
DOMErrorName::EncodingError => 0,
@@ -70,12 +70,12 @@ impl<'a> DOMExceptionMethods for &'a DOMException {
}
// https://heycam.github.io/webidl/#idl-DOMException-error-names
- fn Name(self) -> DOMString {
+ fn Name(&self) -> DOMString {
format!("{:?}", self.code)
}
// https://heycam.github.io/webidl/#error-names
- fn Message(self) -> DOMString {
+ fn Message(&self) -> DOMString {
let message = match self.code {
DOMErrorName::IndexSizeError => "The index is not in the allowed range.",
DOMErrorName::HierarchyRequestError => "The operation would yield an incorrect node tree.",