mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Remove "DerefMut" implementation from Root/JSRef.
This commit is contained in:
parent
8ec2017126
commit
7fcade294c
1 changed files with 0 additions and 14 deletions
|
@ -432,12 +432,6 @@ impl<'a, 'b, T: Reflectable> Deref<JSRef<'b, T>> for Root<'a, 'b, T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'b, T: Reflectable> DerefMut<JSRef<'b, T>> for Root<'a, 'b, T> {
|
|
||||||
fn deref_mut<'c>(&'c mut self) -> &'c mut JSRef<'b, T> {
|
|
||||||
&mut self.jsref
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a, T: Reflectable> Deref<T> for JSRef<'a, T> {
|
impl<'a, T: Reflectable> Deref<T> for JSRef<'a, T> {
|
||||||
fn deref<'b>(&'b self) -> &'b T {
|
fn deref<'b>(&'b self) -> &'b T {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -446,14 +440,6 @@ impl<'a, T: Reflectable> Deref<T> for JSRef<'a, T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, T: Reflectable> DerefMut<T> for JSRef<'a, T> {
|
|
||||||
fn deref_mut<'b>(&'b mut self) -> &'b mut T {
|
|
||||||
unsafe {
|
|
||||||
&mut *(self.ptr as *mut T)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Encapsulates a reference to something that is guaranteed to be alive. This is freely copyable.
|
/// Encapsulates a reference to something that is guaranteed to be alive. This is freely copyable.
|
||||||
pub struct JSRef<'a, T> {
|
pub struct JSRef<'a, T> {
|
||||||
ptr: *T,
|
ptr: *T,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue