std: remove foldr and alli methods in vec

This commit is contained in:
Huon Wilson 2013-06-08 18:28:08 +10:00
parent ed299af625
commit 513d2292e5
14 changed files with 26 additions and 37 deletions

View file

@ -363,7 +363,7 @@ fn validate(edges: ~[(node_id, node_id)],
info!(~"Verifying tree edges...");
let status = do tree.alli() |k, parent| {
let status = do tree.iter().enumerate().all |(k, parent)| {
if *parent != root && *parent != -1i64 {
level[*parent] == level[k] - 1
}

View file

@ -14,7 +14,7 @@ fn main() {
let needlesArr: ~[char] = ~['a', 'f'];
do needlesArr.iter().fold() |x, y| {
}
//~^ ERROR 1 parameter were supplied (including the closure passed by the `do` keyword)
//~^ ERROR 1 parameter was supplied (including the closure passed by the `do` keyword)
//
// the first error is, um, non-ideal.
}

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec;
use std::iterator::IteratorUtil;
pub fn main() {
let v = ~[-1f, 0f, 1f, 2f, 3f];

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec;
use std::iterator::IteratorUtil;
pub fn main() {
fn f(i: &fn() -> uint) -> uint { i() }

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::vec;
use std::iterator::IteratorUtil;
pub fn main() {
fn f(i: uint) -> uint { i }