replace old_iter::repeat with the Times trait
This commit is contained in:
parent
e91daaa8a9
commit
d953a5ce43
13 changed files with 28 additions and 54 deletions
|
|
@ -30,7 +30,7 @@ fn main() {
|
|||
}
|
||||
|
||||
fn run(repeat: int, depth: int) {
|
||||
for old_iter::repeat(repeat as uint) {
|
||||
for (repeat as uint).times {
|
||||
debug!("starting %.4f", precise_time_s());
|
||||
do task::try {
|
||||
recurse_or_fail(depth, None)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ fn count(n: uint) -> uint {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
for old_iter::repeat(10u) {
|
||||
for 10u.times {
|
||||
do task::spawn {
|
||||
let result = count(5u);
|
||||
debug!("result = %?", result);
|
||||
|
|
|
|||
|
|
@ -21,5 +21,5 @@ fn bitv_test() -> bool {
|
|||
}
|
||||
|
||||
pub fn main() {
|
||||
do old_iter::repeat(10000) || {bitv_test()};
|
||||
do 10000.times || {bitv_test()};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ fn count(n: uint) -> uint {
|
|||
}
|
||||
|
||||
pub fn main() {
|
||||
for old_iter::repeat(100u) {
|
||||
for 100u.times {
|
||||
do task::spawn {
|
||||
assert!(count(5u) == 16u);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ fn count(n: uint) -> uint {
|
|||
}
|
||||
|
||||
pub fn main() {
|
||||
for old_iter::repeat(10u) {
|
||||
for 10u.times {
|
||||
do task::spawn {
|
||||
let result = count(5u);
|
||||
debug!("result = %?", result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue