1
Fork 0

rename std::iterator to std::iter

The trait will keep the `Iterator` naming, but a more concise module
name makes using the free functions less verbose. The module will define
iterables in addition to iterators, as it deals with iteration in
general.
This commit is contained in:
Daniel Micay 2013-09-08 11:01:16 -04:00
parent dd5c7379e9
commit 6919cf5fe1
48 changed files with 89 additions and 95 deletions

View file

@ -18,7 +18,6 @@
use std::char;
use std::cast::transmute;
use std::iterator;
use std::float;
use std::hashmap::HashMap;
use std::io::WriterUtil;
@ -489,7 +488,7 @@ pub struct Parser<T> {
}
/// Decode a json value from an Iterator<char>
pub fn Parser<T : iterator::Iterator<char>>(rdr: ~T) -> Parser<T> {
pub fn Parser<T : Iterator<char>>(rdr: ~T) -> Parser<T> {
let mut p = Parser {
rdr: rdr,
ch: '\x00',
@ -500,7 +499,7 @@ pub fn Parser<T : iterator::Iterator<char>>(rdr: ~T) -> Parser<T> {
p
}
impl<T: iterator::Iterator<char>> Parser<T> {
impl<T: Iterator<char>> Parser<T> {
pub fn parse(&mut self) -> Result<Json, Error> {
match self.parse_value() {
Ok(value) => {
@ -518,7 +517,7 @@ impl<T: iterator::Iterator<char>> Parser<T> {
}
}
impl<T : iterator::Iterator<char>> Parser<T> {
impl<T : Iterator<char>> Parser<T> {
// FIXME: #8971: unsound
fn eof(&self) -> bool { self.ch == unsafe { transmute(-1u32) } }