diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-04-26 17:38:00 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-04-26 21:39:09 +0200 |
commit | 9369b616ce7c08444f9d2072a2c212165bf4d412 (patch) | |
tree | 63040d0538ecde71161c6bebea5ec915f4396fc2 /components/script/dom/bindings/js.rs | |
parent | 1389be37823fccf4108f4e79d0a3a793f0bbe93e (diff) | |
download | servo-9369b616ce7c08444f9d2072a2c212165bf4d412.tar.gz servo-9369b616ce7c08444f9d2072a2c212165bf4d412.zip |
Remove useless unsafe methods on JS<T>
Diffstat (limited to 'components/script/dom/bindings/js.rs')
-rw-r--r-- | components/script/dom/bindings/js.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs index 6b3ce4a555c..cc36600318c 100644 --- a/components/script/dom/bindings/js.rs +++ b/components/script/dom/bindings/js.rs @@ -186,13 +186,6 @@ impl<T: Reflectable> Temporary<T> { unsafe fn inner(&self) -> JS<T> { self.inner.clone() } - - /// Returns `self` as a `Temporary` of another type. For use by - /// `InheritTypes` only. - //XXXjdm It would be lovely if this could be private. - pub unsafe fn transmute<To>(self) -> Temporary<To> { - mem::transmute(self) - } } /// A traced reference to a DOM object. Must only be used as a field in other @@ -438,13 +431,6 @@ impl<T: Reflectable> LayoutJS<T> { } } -impl<From> JS<From> { - /// Return `self` as a `JS` of another type. - pub unsafe fn transmute_copy<To>(&self) -> JS<To> { - mem::transmute_copy(self) - } -} - impl<From> LayoutJS<From> { /// Return `self` as a `LayoutJS` of another type. pub unsafe fn transmute_copy<To>(&self) -> LayoutJS<To> { @@ -748,18 +734,6 @@ impl<'a, 'b, T> PartialEq<JSRef<'b, T>> for JSRef<'a, T> { } impl<'a,T> JSRef<'a,T> { - /// Return `self` as a `JSRef` of another type. - //XXXjdm It would be lovely if this could be private. - pub unsafe fn transmute<To>(self) -> JSRef<'a, To> { - mem::transmute(self) - } - - /// Return `self` as a borrowed reference to a `JSRef` of another type. - // FIXME(zwarich): It would be nice to get rid of this entirely. - pub unsafe fn transmute_borrowed<'b, To>(&'b self) -> &'b JSRef<'a, To> { - mem::transmute(self) - } - /// Return an unrooted `JS<T>` for the inner pointer. pub fn unrooted(&self) -> JS<T> { JS { |