diff options
Diffstat (limited to 'src/libstd/str/ascii.rs')
| -rw-r--r-- | src/libstd/str/ascii.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/str/ascii.rs b/src/libstd/str/ascii.rs index 24e48dbe139..3f24f98bd3d 100644 --- a/src/libstd/str/ascii.rs +++ b/src/libstd/str/ascii.rs @@ -14,9 +14,10 @@ use to_str::{ToStr,ToStrConsume}; use str; use str::StrSlice; use cast; -use iterator::IteratorUtil; +use iterator::{Iterator, IteratorUtil}; use vec::{CopyableVector, ImmutableVector, OwnedVector}; use to_bytes::IterBytes; +use option::{Some, None}; /// Datatype to hold one ascii character. It wraps a `u8`, with the highest bit always zero. #[deriving(Clone, Eq)] @@ -93,7 +94,7 @@ impl<'self> AsciiCast<&'self[Ascii]> for &'self [u8] { #[inline] fn is_ascii(&self) -> bool { - for self.iter().advance |b| { + foreach b in self.iter() { if !b.is_ascii() { return false; } } true |
