mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Implement Clone for Copy types.
This commit is contained in:
parent
b6fc83cf2b
commit
903305416a
53 changed files with 105 additions and 105 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue