Remove the global 'vec::to_owned' function

This commit is contained in:
Alex Crichton
2013-07-12 00:53:03 -07:00
committed by Daniel Micay
parent 2b96408600
commit 1ec06e0124
19 changed files with 31 additions and 48 deletions

View File

@@ -91,11 +91,6 @@ pub fn from_elem<T:Copy>(n_elts: uint, t: T) -> ~[T] {
}
}
/// Creates a new unique vector with the same contents as the slice
pub fn to_owned<T:Copy>(t: &[T]) -> ~[T] {
from_fn(t.len(), |i| copy t[i])
}
/// Creates a new vector with a capacity of `capacity`
#[cfg(stage0)]
pub fn with_capacity<T>(capacity: uint) -> ~[T] {