about summary refs log tree commit diff
path: root/src/libcore/str.rs
diff options
context:
space:
mode:
authorFlorian Wilkens <floya@live.de>2014-12-19 21:52:10 +0100
committerFlorian Wilkens <floya@live.de>2014-12-22 12:58:55 +0100
commitf8cfd2480b69a1cc266fc91d0b60c825a9dc18a7 (patch)
tree6d0eff18d899f6a660797fa3fa4265fd59ad4ed7 /src/libcore/str.rs
parent34d680009205de2302b902d8f9f5f7ae7a042f1a (diff)
downloadrust-f8cfd2480b69a1cc266fc91d0b60c825a9dc18a7.tar.gz
rust-f8cfd2480b69a1cc266fc91d0b60c825a9dc18a7.zip
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].
Diffstat (limited to 'src/libcore/str.rs')
-rw-r--r--src/libcore/str.rs9
1 files changed, 4 insertions, 5 deletions
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<u8>) -> bool {
+fn run_utf8_validation_iterator(iter: &mut slice::Iter<u8>) -> 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 { "" }
 }
-