auto merge of #12697 : thestinger/rust/vec, r=huonw
This exists for the sake of compatibility during the ~[T] -> Vec<T> transition. It will be removed in the future.
This commit is contained in:
commit
dcb24f5450
3 changed files with 3 additions and 0 deletions
|
@ -369,6 +369,7 @@ impl<T> Vec<T> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
#[deprecated="Use `xs.iter().map(closure)` instead."]
|
||||
pub fn map<U>(&self, f: |t: &T| -> U) -> Vec<U> {
|
||||
self.iter().map(f).collect()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue