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
|
@ -170,7 +170,7 @@ pub trait TLayoutNode {
|
|||
|
||||
/// A wrapper so that layout can access only the methods that it should have access to. Layout must
|
||||
/// only ever see these and must never see instances of `LayoutJS`.
|
||||
#[derive(Copy)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct LayoutNode<'a> {
|
||||
/// The wrapped node.
|
||||
node: LayoutJS<Node>,
|
||||
|
@ -179,15 +179,6 @@ pub struct LayoutNode<'a> {
|
|||
pub chain: PhantomData<&'a ()>,
|
||||
}
|
||||
|
||||
impl<'ln> Clone for LayoutNode<'ln> {
|
||||
fn clone(&self) -> LayoutNode<'ln> {
|
||||
LayoutNode {
|
||||
node: self.node.clone(),
|
||||
chain: self.chain,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> PartialEq for LayoutNode<'a> {
|
||||
#[inline]
|
||||
fn eq(&self, other: &LayoutNode) -> bool {
|
||||
|
@ -520,7 +511,7 @@ impl<'a> Iterator for LayoutTreeIterator<'a> {
|
|||
}
|
||||
|
||||
/// A wrapper around elements that ensures layout can only ever access safe properties.
|
||||
#[derive(Copy)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct LayoutElement<'le> {
|
||||
element: &'le Element,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue