From e33fca9ffefffc982bbde860251f11b191457412 Mon Sep 17 00:00:00 2001 From: Marvin Löbel Date: Sat, 27 Jul 2013 23:38:38 +0200 Subject: Added str::char_offset_iter() and str::rev_char_offset_iter() Renamed bytes_iter to byte_iter to match other iterators Refactored str Iterators to use DoubleEnded Iterators and typedefs instead of wrapper structs Reordered the Iterator section Whitespace fixup Moved clunky `each_split_within` function to the one place in the tree where it's actually needed Replaced all block doccomments in str with line doccomments --- src/test/run-pass/linear-for-loop.rs | 2 +- src/test/run-pass/utf8.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test') diff --git a/src/test/run-pass/linear-for-loop.rs b/src/test/run-pass/linear-for-loop.rs index 95d5483a72a..c4e73dfcda5 100644 --- a/src/test/run-pass/linear-for-loop.rs +++ b/src/test/run-pass/linear-for-loop.rs @@ -16,7 +16,7 @@ pub fn main() { assert_eq!(y, 6); let s = ~"hello there"; let mut i: int = 0; - for s.bytes_iter().advance |c| { + for s.byte_iter().advance |c| { if i == 0 { assert!((c == 'h' as u8)); } if i == 1 { assert!((c == 'e' as u8)); } if i == 2 { assert!((c == 'l' as u8)); } diff --git a/src/test/run-pass/utf8.rs b/src/test/run-pass/utf8.rs index e0cb2703deb..955e6118c83 100644 --- a/src/test/run-pass/utf8.rs +++ b/src/test/run-pass/utf8.rs @@ -41,7 +41,7 @@ pub fn main() { fn check_str_eq(a: ~str, b: ~str) { let mut i: int = 0; - for a.bytes_iter().advance |ab| { + for a.byte_iter().advance |ab| { info!(i); info!(ab); let bb: u8 = b[i]; -- cgit 1.4.1-3-g733a5