diff options
author | Tetsuharu OHZEKI <saneyuki.snyk@gmail.com> | 2015-01-12 02:17:58 +0900 |
---|---|---|
committer | Tetsuharu OHZEKI <saneyuki.snyk@gmail.com> | 2015-02-01 01:54:37 +0900 |
commit | 6b1e2bd11ca73777283ad4953e8fc07a3323eca0 (patch) | |
tree | 32be47981ca80f8cda65edc08abcd5090104463e /components/script/dom/bindings/js.rs | |
parent | e2bd9eadd85618d9fed4734f80931964b86d134a (diff) | |
download | servo-6b1e2bd11ca73777283ad4953e8fc07a3323eca0.tar.gz servo-6b1e2bd11ca73777283ad4953e8fc07a3323eca0.zip |
Use LayoutJS<T> in layout crate.
Diffstat (limited to 'components/script/dom/bindings/js.rs')
-rw-r--r-- | components/script/dom/bindings/js.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs index 2e229a28df3..f2d00c6d76f 100644 --- a/components/script/dom/bindings/js.rs +++ b/components/script/dom/bindings/js.rs @@ -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> {} |