diff options
| author | blake2-ppc <blake2-ppc> | 2013-08-01 04:18:19 +0200 |
|---|---|---|
| committer | blake2-ppc <blake2-ppc> | 2013-08-01 16:54:22 +0200 |
| commit | 78cde5b9fb9db91f954f7fe4afdd230de6754e54 (patch) | |
| tree | 524e26fcde0b5f86f453eac7768b4881d6f979fc /src/libstd/rt/mod.rs | |
| parent | 7e210a8129c844e0b3aca4a28153effd0817ef41 (diff) | |
| download | rust-78cde5b9fb9db91f954f7fe4afdd230de6754e54.tar.gz rust-78cde5b9fb9db91f954f7fe4afdd230de6754e54.zip | |
std: Change `Times` trait to use `do` instead of `for`
Change the former repetition::
for 5.times { }
to::
do 5.times { }
.times() cannot be broken with `break` or `return` anymore; for those
cases, use a numerical range loop instead.
Diffstat (limited to 'src/libstd/rt/mod.rs')
| -rw-r--r-- | src/libstd/rt/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 8648832c591..3bcf6787824 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -255,7 +255,7 @@ fn run_(main: ~fn(), use_main_sched: bool) -> int { // sent the Shutdown message to terminate the schedulers. let mut handles = ~[]; - for nscheds.times { + do nscheds.times { // Every scheduler is driven by an I/O event loop. let loop_ = ~UvEventLoop::new(); let mut sched = ~Scheduler::new(loop_, work_queue.clone(), sleepers.clone()); |
