diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-07 15:32:04 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-07 17:39:03 -0700 |
| commit | 2810ea9a687df32064dc3fa7db48f52e27d39ed5 (patch) | |
| tree | 4fb386e360cc050a7a05afe564cec58fe65a245a /src/libcore | |
| parent | 073df63c72faed7a773cb9ad0ad5e27edcb4f9f1 (diff) | |
Convert 'again' to 'loop'. Remove 'again' keyword
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/gc.rs | 8 | ||||
| -rw-r--r-- | src/libcore/io.rs | 2 | ||||
| -rw-r--r-- | src/libcore/path.rs | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/libcore/gc.rs b/src/libcore/gc.rs index d12062f827a..402e786d842 100644 --- a/src/libcore/gc.rs +++ b/src/libcore/gc.rs @@ -218,7 +218,7 @@ unsafe fn walk_gc_roots(mem: Memory, sentinel: **Word, visitor: Visitor) { last_ret = *ptr::offset(frame.fp, ret_offset) as *Word; if ptr::is_null(pc) { - again; + loop; } let mut delay_reached_sentinel = reached_sentinel; @@ -231,13 +231,13 @@ unsafe fn walk_gc_roots(mem: Memory, sentinel: **Word, visitor: Visitor) { if root == sentinel { delay_reached_sentinel = true; } - again; + loop; } // Skip null pointers, which can occur when a // unique pointer has already been freed. if ptr::is_null(*root) { - again; + loop; } if ptr::is_null(tydesc) { @@ -324,7 +324,7 @@ fn cleanup_stack_for_failure() { for walk_gc_roots(need_cleanup, sentinel) |root, tydesc| { // Track roots to avoid double frees. if option::is_some(roots.find(&*root)) { - again; + loop; } roots.insert(*root, ()); diff --git a/src/libcore/io.rs b/src/libcore/io.rs index d16abb26ae3..898d36dab45 100644 --- a/src/libcore/io.rs +++ b/src/libcore/io.rs @@ -84,7 +84,7 @@ impl Reader { assert (w > 0u); if w == 1u { vec::push(chars, b0 as char ); - again; + loop; } // can't satisfy this char with the existing data if end > vec::len(buf) { diff --git a/src/libcore/path.rs b/src/libcore/path.rs index a8827c08a7c..00520c881b9 100644 --- a/src/libcore/path.rs +++ b/src/libcore/path.rs @@ -419,10 +419,10 @@ pure fn normalize(components: &[~str]) -> ~[~str] { unchecked { for components.each |c| { unchecked { - if c == ~"." && components.len() > 1 { again; } + if c == ~"." && components.len() > 1 { loop; } if c == ~".." && cs.len() != 0 { vec::pop(cs); - again; + loop; } vec::push(cs, copy c); } |
