std: remove foldr and alli methods in vec
This commit is contained in:
parent
ed299af625
commit
513d2292e5
14 changed files with 26 additions and 37 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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() }
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue