diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2013-11-23 11:18:51 +0100 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2013-11-26 10:02:26 +0100 |
| commit | 24b316a3b9567cb2cc2fb6644bd891dbf8855c18 (patch) | |
| tree | 567d9df8a078d09fc610ea3e0b301f5cb6fb63d8 /src/libstd/ascii.rs | |
| parent | b42c4388927db75f9a38edbeafbfe13775b1773d (diff) | |
| download | rust-24b316a3b9567cb2cc2fb6644bd891dbf8855c18.tar.gz rust-24b316a3b9567cb2cc2fb6644bd891dbf8855c18.zip | |
Removed unneccessary `_iter` suffixes from various APIs
Diffstat (limited to 'src/libstd/ascii.rs')
| -rw-r--r-- | src/libstd/ascii.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs index fb1cb26ec5d..5d4f6ee1121 100644 --- a/src/libstd/ascii.rs +++ b/src/libstd/ascii.rs @@ -180,7 +180,7 @@ impl<'self> AsciiCast<&'self [Ascii]> for &'self str { #[inline] fn is_ascii(&self) -> bool { - self.byte_iter().all(|b| b.is_ascii()) + self.bytes().all(|b| b.is_ascii()) } } @@ -394,7 +394,7 @@ unsafe fn str_map_bytes(string: ~str, map: &'static [u8]) -> ~str { #[inline] unsafe fn str_copy_map_bytes(string: &str, map: &'static [u8]) -> ~str { - let bytes = string.byte_iter().map(|b| map[b]).to_owned_vec(); + let bytes = string.bytes().map(|b| map[b]).to_owned_vec(); str::raw::from_utf8_owned(bytes) } @@ -498,8 +498,8 @@ mod tests { assert_eq!('`'.to_ascii().to_upper().to_char(), '`'); assert_eq!('{'.to_ascii().to_upper().to_char(), '{'); - assert!("banana".iter().all(|c| c.is_ascii())); - assert!(!"ประเทศไทย中华Việt Nam".iter().all(|c| c.is_ascii())); + assert!("banana".chars().all(|c| c.is_ascii())); + assert!(!"ประเทศไทย中华Việt Nam".chars().all(|c| c.is_ascii())); } #[test] |
