~[] to Vec in main

This commit is contained in:
Matt Murphy 2014-04-22 22:53:10 -05:00 committed by Ms2ger
parent 6522e7827d
commit 3d1a885a55
2 changed files with 2 additions and 3 deletions

View file

@ -596,7 +596,6 @@ impl<T: Tile> QuadtreeNode<T> {
}; };
delta = delta + c_delta; delta = delta + c_delta;
// This was a ~[] = ~[] + ~[] which copies. I think this is the equivalent operation.
request.push_all(c_request.as_slice()); request.push_all(c_request.as_slice());
unused.push_all_move(c_unused); unused.push_all_move(c_unused);
} }

View file

@ -50,7 +50,7 @@ struct Float {
#[deriving(Clone)] #[deriving(Clone)]
struct FloatList { struct FloatList {
/// Information about each of the floats here. /// Information about each of the floats here.
floats: ~[Float], floats: Vec<Float>,
/// Cached copy of the maximum top offset of the float. /// Cached copy of the maximum top offset of the float.
max_top: Au, max_top: Au,
} }
@ -58,7 +58,7 @@ struct FloatList {
impl FloatList { impl FloatList {
fn new() -> FloatList { fn new() -> FloatList {
FloatList { FloatList {
floats: ~[], floats: Vec::new(),
max_top: Au(0), max_top: Au(0),
} }
} }