mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use LayoutJS<T> in layout crate.
This commit is contained in:
parent
e2bd9eadd8
commit
6b1e2bd11c
4 changed files with 50 additions and 42 deletions
|
@ -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> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue