From 3d1a885a556d43339c561c1123579f3a5669679e Mon Sep 17 00:00:00 2001 From: Matt Murphy Date: Tue, 22 Apr 2014 22:53:10 -0500 Subject: [PATCH] ~[] to Vec in main --- src/components/main/compositing/quadtree.rs | 1 - src/components/main/layout/floats.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/main/compositing/quadtree.rs b/src/components/main/compositing/quadtree.rs index e7d677e474a..1741de6c8ca 100644 --- a/src/components/main/compositing/quadtree.rs +++ b/src/components/main/compositing/quadtree.rs @@ -596,7 +596,6 @@ impl QuadtreeNode { }; delta = delta + c_delta; - // This was a ~[] = ~[] + ~[] which copies. I think this is the equivalent operation. request.push_all(c_request.as_slice()); unused.push_all_move(c_unused); } diff --git a/src/components/main/layout/floats.rs b/src/components/main/layout/floats.rs index fc1d6bafe89..3144629f405 100644 --- a/src/components/main/layout/floats.rs +++ b/src/components/main/layout/floats.rs @@ -50,7 +50,7 @@ struct Float { #[deriving(Clone)] struct FloatList { /// Information about each of the floats here. - floats: ~[Float], + floats: Vec, /// Cached copy of the maximum top offset of the float. max_top: Au, } @@ -58,7 +58,7 @@ struct FloatList { impl FloatList { fn new() -> FloatList { FloatList { - floats: ~[], + floats: Vec::new(), max_top: Au(0), } }