Implement Clone for Copy types.

This commit is contained in:
Ms2ger 2015-04-28 19:42:46 +02:00
parent b6fc83cf2b
commit 903305416a
53 changed files with 105 additions and 105 deletions

View file

@ -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,
}