diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-04-28 19:42:46 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-04-28 23:31:10 +0200 |
commit | 903305416a8fd4eef75960f9e83491adaaa519e8 (patch) | |
tree | 445f64c0a52c3b554ffc50ee96fe54ea11f32f86 /components/script/dom/bindings/js.rs | |
parent | b6fc83cf2b4b426548bb9d10e9493f2b111bd617 (diff) | |
download | servo-903305416a8fd4eef75960f9e83491adaaa519e8.tar.gz servo-903305416a8fd4eef75960f9e83491adaaa519e8.zip |
Implement Clone for Copy types.
Diffstat (limited to 'components/script/dom/bindings/js.rs')
-rw-r--r-- | components/script/dom/bindings/js.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs index 115fcdbbe97..c80aa48b4ac 100644 --- a/components/script/dom/bindings/js.rs +++ b/components/script/dom/bindings/js.rs @@ -124,6 +124,9 @@ impl<T: Reflectable> Rootable<T> for Unrooted<T> { } impl<T> Copy for Unrooted<T> {} +impl<T> Clone for Unrooted<T> { + fn clone(&self) -> Unrooted<T> { *self } +} /// A type that represents a JS-owned value that is rooted for the lifetime of /// this value. Importantly, it requires explicit rooting in order to interact @@ -545,6 +548,9 @@ pub struct RootCollection { pub struct RootCollectionPtr(pub *const RootCollection); impl Copy for RootCollectionPtr {} +impl Clone for RootCollectionPtr { + fn clone(&self) -> RootCollectionPtr { *self } +} impl RootCollection { /// Create an empty collection of roots |