1
Fork 0

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.
This commit is contained in:
blake2-ppc 2013-08-01 04:18:19 +02:00
parent 7e210a8129
commit 78cde5b9fb
61 changed files with 137 additions and 151 deletions

View file

@ -77,7 +77,7 @@ fn escape_str(s: &str) -> ~str {
fn spaces(n: uint) -> ~str {
let mut ss = ~"";
for n.times {
do n.times {
ss.push_str(" ");
}
return ss;