Use LayoutJS<T> in layout crate.

This commit is contained in:
Tetsuharu OHZEKI 2015-01-12 02:17:58 +09:00
parent e2bd9eadd8
commit 6b1e2bd11c
4 changed files with 50 additions and 42 deletions

View file

@ -144,6 +144,14 @@ pub struct LayoutJS<T> {
ptr: NonZero<*const T>
}
impl<T> LayoutJS<T> {
pub fn to_script(self) -> JS<T> {
JS {
ptr: self.ptr
}
}
}
impl<T> Copy for JS<T> {}
impl<T> Copy for LayoutJS<T> {}