about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-10-02 02:31:29 -0700
committerbors <bors@rust-lang.org>2013-10-02 02:31:29 -0700
commitd00c9269dce3a7925d7d0bf5edb64b3c6747c6af (patch)
tree2446c316e34164e1b0795fb909de8951d503fe20 /src/libstd
parent97cd495aca946d088e103d364d3be34f2bfaf1e1 (diff)
parent4f67dcb24adb1e23f04e624fcbaf2328b82491b6 (diff)
downloadrust-d00c9269dce3a7925d7d0bf5edb64b3c6747c6af.tar.gz
rust-d00c9269dce3a7925d7d0bf5edb64b3c6747c6af.zip
auto merge of #9665 : alexcrichton/rust/snapshot, r=brson
Uses the new snapshots to kill the old `loop` and introduce the new `continue`.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io.rs2
-rw-r--r--src/libstd/iter.rs8
-rw-r--r--src/libstd/num/strconv.rs2
-rw-r--r--src/libstd/path.rs6
-rw-r--r--src/libstd/rand/mod.rs2
-rw-r--r--src/libstd/rt/logging.rs4
6 files changed, 12 insertions, 12 deletions
diff --git a/src/libstd/io.rs b/src/libstd/io.rs
index dfe517932fc..2dfd41a4435 100644
--- a/src/libstd/io.rs
+++ b/src/libstd/io.rs
@@ -665,7 +665,7 @@ impl<T:Reader> ReaderUtil for T {
                     unsafe {
                         chars.push(transmute(b0 as u32));
                     }
-                    loop;
+                    continue;
                 }
                 // can't satisfy this char with the existing data
                 if end > bytes_len {
diff --git a/src/libstd/iter.rs b/src/libstd/iter.rs
index 6043f7e3f52..5b7753a337c 100644
--- a/src/libstd/iter.rs
+++ b/src/libstd/iter.rs
@@ -1150,7 +1150,7 @@ impl<'self, A, T: Iterator<A>> Iterator<A> for Filter<'self, A, T> {
             if (self.predicate)(&x) {
                 return Some(x);
             } else {
-                loop
+                continue
             }
         }
         None
@@ -1173,7 +1173,7 @@ impl<'self, A, T: DoubleEndedIterator<A>> DoubleEndedIterator<A> for Filter<'sel
                     if (self.predicate)(&x) {
                         return Some(x);
                     } else {
-                        loop
+                        continue
                     }
                 }
             }
@@ -1342,7 +1342,7 @@ impl<'self, A, T: Iterator<A>> Iterator<A> for SkipWhile<'self, A, T> {
                     Some(x) => {
                         if (self.predicate)(&x) {
                             next = self.iter.next();
-                            loop
+                            continue
                         } else {
                             self.flag = true;
                             return Some(x)
@@ -1415,7 +1415,7 @@ impl<A, T: Iterator<A>> Iterator<A> for Skip<T> {
                 match next {
                     Some(_) => {
                         next = self.iter.next();
-                        loop
+                        continue
                     }
                     None => {
                         self.n = 0;
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs
index c45d77dad9d..1863369fdf7 100644
--- a/src/libstd/num/strconv.rs
+++ b/src/libstd/num/strconv.rs
@@ -354,7 +354,7 @@ pub fn float_to_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+Float+Round+
                     }
 
                     // Skip the '.'
-                    if buf[i] == '.' as u8 { i -= 1; loop; }
+                    if buf[i] == '.' as u8 { i -= 1; continue; }
 
                     // Either increment the digit,
                     // or set to 0 if max and carry the 1.
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index 0d4bcb4ec47..ea157c6eea6 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -992,11 +992,11 @@ impl GenericPath for WindowsPath {
 pub fn normalize(components: &[~str]) -> ~[~str] {
     let mut cs = ~[];
     for c in components.iter() {
-        if *c == ~"." && components.len() > 1 { loop; }
-        if *c == ~"" { loop; }
+        if *c == ~"." && components.len() > 1 { continue; }
+        if *c == ~"" { continue; }
         if *c == ~".." && cs.len() != 0 {
             cs.pop();
-            loop;
+            continue;
         }
         cs.push((*c).clone());
     }
diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs
index 5a7708b7fb2..cc9e395e739 100644
--- a/src/libstd/rand/mod.rs
+++ b/src/libstd/rand/mod.rs
@@ -536,7 +536,7 @@ pub trait Rng {
         for (i, elem) in iter.enumerate() {
             if i < n {
                 reservoir.push(elem);
-                loop
+                continue
             }
 
             let k = self.gen_integer_range(0, i + 1);
diff --git a/src/libstd/rt/logging.rs b/src/libstd/rt/logging.rs
index 51eb2505f55..299aa1175a7 100644
--- a/src/libstd/rt/logging.rs
+++ b/src/libstd/rt/logging.rs
@@ -92,14 +92,14 @@ fn parse_logging_spec(spec: ~str) -> ~[LogDirective]{
                     _ => {
                         dumb_println(format!("warning: invalid logging spec \
                                               '{}', ignoring it", parts[1]));
-                        loop;
+                        continue;
                     }
                 }
             },
             _ => {
                 dumb_println(format!("warning: invalid logging spec '{}',\
                                       ignoring it", s));
-                loop;
+                continue;
             }
         }
         let dir = LogDirective {name: name, level: log_level};