Skip to content

Commit b8fa9d3

Browse files
committedJun 8, 2013
auto merge of #7015 : huonw/rust/each-fn-kill, r=thestinger
Continuation of #6995/#6999.
2 parents e2ec8e7 + 98ba91f commit b8fa9d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+449
-952
lines changed
 

‎doc/tutorial-tasks.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,11 @@ a single large vector of floats. Each task needs the full vector to perform its
351351
# use std::vec;
352352
# use std::uint;
353353
# use std::rand;
354+
# use std::iterator::IteratorUtil;
354355
use extra::arc::ARC;
355356
356357
fn pnorm(nums: &~[float], p: uint) -> float {
357-
(vec::foldl(0.0, *nums, |a,b| a+(*b).pow(p as float) )).pow(1f / (p as float))
358+
nums.iter().fold(0.0, |a,b| a+(*b).pow(p as float) ).pow(1f / (p as float))
358359
}
359360
360361
fn main() {

‎src/compiletest/procsrv.rs

-6
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@
1010

1111
use core::prelude::*;
1212

13-
use core::comm;
14-
use core::io;
15-
use core::libc::c_int;
1613
use core::os;
1714
use core::run;
1815
use core::str;
19-
use core::task;
20-
use core::vec;
2116

2217
#[cfg(target_os = "win32")]
2318
fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] {
@@ -74,4 +69,3 @@ pub fn run(lib_path: &str,
7469
err: str::from_bytes(output.error)
7570
}
7671
}
77-

0 commit comments

Comments
 (0)
Please sign in to comment.