Make list::from_vec take a slice, not a ~.

This commit is contained in:
Ben Blum 2012-06-30 00:19:51 -04:00
parent dc93814bf9
commit 5b41592f21

View File

@ -10,7 +10,7 @@ enum list<T> {
}
#[doc = "Create a list from a vector"]
fn from_vec<T: copy>(v: ~[T]) -> @list<T> {
fn from_vec<T: copy>(v: &[T]) -> @list<T> {
vec::foldr(v, @nil::<T>, |h, t| @cons(h, t))
}