aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-04-26 17:38:13 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2015-04-26 21:39:11 +0200
commit4e7b9d319c760476e41a1e886b71ed179ed06d5e (patch)
tree1a57766735733fd8a88b1cbcd398e03c6fa89642 /components/script/dom/bindings/codegen/CodegenRust.py
parent9369b616ce7c08444f9d2072a2c212165bf4d412 (diff)
downloadservo-4e7b9d319c760476e41a1e886b71ed179ed06d5e.tar.gz
servo-4e7b9d319c760476e41a1e886b71ed179ed06d5e.zip
Remove useless unsafe methods on LayoutJS<T>
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 0008790c973..3748917038f 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -5471,7 +5471,7 @@ impl ${name}Cast {
pub fn to_layout_js<T: ${toBound}+Reflectable>(base: &LayoutJS<T>) -> Option<LayoutJS<${name}>> {
unsafe {
match (*base.unsafe_get()).${checkFn}() {
- true => Some(base.transmute_copy()),
+ true => Some(mem::transmute_copy(base)),
false => None
}
}
@@ -5498,7 +5498,7 @@ impl ${name}Cast {
#[inline(always)]
#[allow(unrooted_must_root)]
pub fn from_layout_js<T: ${fromBound}+Reflectable>(derived: &LayoutJS<T>) -> LayoutJS<${name}> {
- unsafe { derived.transmute_copy() }
+ unsafe { mem::transmute_copy(derived) }
}
#[inline(always)]