diff options
author | Cameron Zwarich <zwarich@mozilla.com> | 2014-05-27 18:05:00 -0700 |
---|---|---|
committer | Cameron Zwarich <zwarich@mozilla.com> | 2014-05-27 18:05:00 -0700 |
commit | c29d1b5cccf06f0dc7acca5b35c68f3eb50f43a1 (patch) | |
tree | 87b99bd7f6ddd4907a6d8485471c4fca51468cf7 | |
parent | 65d91e395002106ce263f5ccb188eb384963768a (diff) | |
download | servo-c29d1b5cccf06f0dc7acca5b35c68f3eb50f43a1.tar.gz servo-c29d1b5cccf06f0dc7acca5b35c68f3eb50f43a1.zip |
Derive Clone for ChildFrameTree instead of implementing it manually.
-rw-r--r-- | src/components/main/constellation.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/components/main/constellation.rs b/src/components/main/constellation.rs index ab3ac8043dc..e487ece1246 100644 --- a/src/components/main/constellation.rs +++ b/src/components/main/constellation.rs @@ -58,6 +58,7 @@ struct FrameTree { pub children: RefCell<Vec<ChildFrameTree>>, } +#[deriving(Clone)] struct ChildFrameTree { frame_tree: Rc<FrameTree>, /// Clipping rect representing the size and position, in page coordinates, of the visible @@ -65,15 +66,6 @@ struct ChildFrameTree { pub rect: Option<Rect<f32>>, } -impl Clone for ChildFrameTree { - fn clone(&self) -> ChildFrameTree { - ChildFrameTree { - frame_tree: self.frame_tree.clone(), - rect: self.rect.clone(), - } - } -} - pub struct SendableFrameTree { pub pipeline: CompositionPipeline, pub children: Vec<SendableChildFrameTree>, |