aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorTim Taubert <tim@timtaubert.de>2014-10-09 13:12:02 +0200
committerTim Taubert <tim@timtaubert.de>2014-10-09 15:01:54 +0200
commit35f8270c649e932e623f847468c4ddf142df287a (patch)
tree4a2f646db74dc7202247b3f4dc59c3cbb7e39021 /components/script/dom/bindings/codegen/CodegenRust.py
parent15b508ac10d0e98ba10474b6ab091017ae95804e (diff)
downloadservo-35f8270c649e932e623f847468c4ddf142df287a.tar.gz
servo-35f8270c649e932e623f847468c4ddf142df287a.zip
Remove unnecessary `deref()`s (fixes #3586)
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 5b0ee22fe7b..9f80ca0dd5c 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -5465,7 +5465,7 @@ class GlobalGenRoots():
cast = [CGGeneric(string.Template('''pub trait ${castTraitName} {
#[inline(always)]
fn to_ref<'a, T: ${toBound}+Reflectable>(base: JSRef<'a, T>) -> Option<JSRef<'a, Self>> {
- match base.deref().${checkFn}() {
+ match base.${checkFn}() {
true => unsafe { Some(base.transmute()) },
false => None
}
@@ -5473,7 +5473,7 @@ class GlobalGenRoots():
#[inline(always)]
fn to_borrowed_ref<'a, 'b, T: ${toBound}+Reflectable>(base: &'a JSRef<'b, T>) -> Option<&'a JSRef<'b, Self>> {
- match base.deref().${checkFn}() {
+ match base.${checkFn}() {
true => unsafe { Some(base.transmute_borrowed()) },
false => None
}