Remove uses of &mut JSRef

Since everything with JSRef happens with interior mutability, it doesn't
make any sense to use an &mut JSRef.
This commit is contained in:
Cameron Zwarich 2014-09-18 15:30:38 -07:00
parent 5e5f77a354
commit 176b3f7698
2 changed files with 1 additions and 14 deletions

View file

@ -5478,24 +5478,11 @@ class GlobalGenRoots():
}
}
#[inline(always)]
fn to_mut_ref<'a, 'b, T: ${toBound}+Reflectable>(base: &'a mut JSRef<'b, T>) -> Option<&'a mut JSRef<'b, Self>> {
match base.deref().${checkFn}() {
true => unsafe { Some(base.transmute_mut()) },
false => None
}
}
#[inline(always)]
fn from_ref<'a, 'b, T: ${fromBound}>(derived: &'a JSRef<'b, T>) -> &'a JSRef<'b, Self> {
unsafe { derived.transmute() }
}
#[inline(always)]
fn from_mut_ref<'a, 'b, T: ${fromBound}>(derived: &'a mut JSRef<'b, T>) -> &'a mut JSRef<'b, Self> {
unsafe { derived.transmute_mut() }
}
#[inline(always)]
fn from_temporary<T: ${fromBound}+Reflectable>(derived: Temporary<T>) -> Temporary<Self> {
unsafe { derived.transmute() }