From f8cfd2480b69a1cc266fc91d0b60c825a9dc18a7 Mon Sep 17 00:00:00 2001 From: Florian Wilkens Date: Fri, 19 Dec 2014 21:52:10 +0100 Subject: Renaming of the Iter types as in RFC #344 libcore: slice::Items -> slice::Iter, slice::MutItems -> slice::IterMut libcollections: *::Items -> *::Iter, *::MoveItems -> *::IntoIter, *::MutItems -> *::IterMut This is of course a [breaking-change]. --- src/libcore/str.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/libcore/str.rs') diff --git a/src/libcore/str.rs b/src/libcore/str.rs index a89a7970ae9..e147229bcbd 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -167,7 +167,7 @@ Section: Iterators /// Created with the method `.chars()`. #[deriving(Clone, Copy)] pub struct Chars<'a> { - iter: slice::Items<'a, u8> + iter: slice::Iter<'a, u8> } // Return the initial codepoint accumulator for the first byte. @@ -315,7 +315,7 @@ impl<'a> DoubleEndedIterator<(uint, char)> for CharOffsets<'a> { /// External iterator for a string's bytes. /// Use with the `std::iter` module. -pub type Bytes<'a> = Map<&'a u8, u8, slice::Items<'a, u8>, BytesFn>; +pub type Bytes<'a> = Map<&'a u8, u8, slice::Iter<'a, u8>, BytesFn>; /// A temporary new type wrapper that ensures that the `Bytes` iterator /// is cloneable. @@ -893,7 +893,7 @@ Section: Misc /// `iter` reset such that it is pointing at the first byte in the /// invalid sequence. #[inline(always)] -fn run_utf8_validation_iterator(iter: &mut slice::Items) -> bool { +fn run_utf8_validation_iterator(iter: &mut slice::Iter) -> bool { loop { // save the current thing we're pointing at. let old = *iter; @@ -993,7 +993,7 @@ pub fn is_utf16(v: &[u16]) -> bool { /// of `u16`s. #[deriving(Clone)] pub struct Utf16Items<'a> { - iter: slice::Items<'a, u16> + iter: slice::Iter<'a, u16> } /// The possibilities for values decoded from a `u16` stream. #[deriving(Copy, PartialEq, Eq, Clone, Show)] @@ -2366,4 +2366,3 @@ impl<'a> Default for &'a str { #[stable] fn default() -> &'a str { "" } } - -- cgit 1.4.1-3-g733a5