Make list::from_vec take a slice, not a ~.
This commit is contained in:
parent
dc93814bf9
commit
5b41592f21
@ -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))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user