We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f9a507 commit c55787dCopy full SHA for c55787d
src/libcore/vec.rs
@@ -1756,6 +1756,7 @@ pub trait OwnedVector<T> {
1756
fn swap_remove(&mut self, index: uint) -> T;
1757
fn truncate(&mut self, newlen: uint);
1758
fn retain(&mut self, f: pure fn(t: &T) -> bool);
1759
+ fn consume(self, f: fn(uint, v: T));
1760
}
1761
1762
impl<T> ~[T]: OwnedVector<T> {
@@ -1809,6 +1810,10 @@ impl<T> ~[T]: OwnedVector<T> {
1809
1810
retain(self, f);
1811
1812
1813
+ #[inline]
1814
+ fn consume(self, f: fn(uint, v: T)) {
1815
+ consume(self, f)
1816
+ }
1817
1818
1819
pub trait OwnedCopyableVector<T: Copy> {
0 commit comments