mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove useless unsafe methods on LayoutJS<T>
This commit is contained in:
parent
9369b616ce
commit
4e7b9d319c
5 changed files with 6 additions and 17 deletions
|
@ -64,7 +64,6 @@ use std::cell::{Cell, UnsafeCell};
|
|||
use std::default::Default;
|
||||
use std::intrinsics::return_address;
|
||||
use std::marker::PhantomData;
|
||||
use std::mem;
|
||||
use std::ops::Deref;
|
||||
|
||||
/// An unrooted, JS-owned value. Must not be held across a GC.
|
||||
|
@ -431,13 +430,6 @@ impl<T: Reflectable> LayoutJS<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<From> LayoutJS<From> {
|
||||
/// Return `self` as a `LayoutJS` of another type.
|
||||
pub unsafe fn transmute_copy<To>(&self) -> LayoutJS<To> {
|
||||
mem::transmute_copy(self)
|
||||
}
|
||||
}
|
||||
|
||||
/// Get an `Option<JSRef<T>>` out of an `Option<Root<T>>`
|
||||
pub trait RootedReference<T> {
|
||||
/// Obtain a safe optional reference to the wrapped JS owned-value that
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue