Skip to content

Commit

Permalink
Remove IteratorExt
Browse files Browse the repository at this point in the history
All methods are inlined into Iterator with `Self: Sized` bounds to make
sure Iterator is still object safe.

[breaking-change]
  • Loading branch information
sfackler committed Mar 28, 2015
1 parent 3e7385a commit d502f42
Show file tree
Hide file tree
Showing 33 changed files with 130 additions and 129 deletions.
2 changes: 1 addition & 1 deletion src/libcollections/linked_list.rs
Expand Up @@ -951,7 +951,7 @@ impl<A: Hash> Hash for LinkedList<A> {
#[cfg(test)]
mod test {
use std::clone::Clone;
use std::iter::{Iterator, IteratorExt};
use std::iter::Iterator;
use std::option::Option::{Some, None, self};
use std::rand;
use std::thread;
Expand Down
5 changes: 2 additions & 3 deletions src/libcollections/slice.rs
Expand Up @@ -76,7 +76,6 @@
//! iterators.
//! * Further methods that return iterators are `.split()`, `.splitn()`,
//! `.chunks()`, `.windows()` and more.

#![doc(primitive = "slice")]
#![stable(feature = "rust1", since = "1.0.0")]

Expand All @@ -85,7 +84,7 @@ use core::convert::AsRef;
use core::clone::Clone;
use core::cmp::Ordering::{self, Greater, Less};
use core::cmp::{self, Ord, PartialEq};
use core::iter::{Iterator, IteratorExt};
use core::iter::Iterator;
use core::iter::MultiplicativeIterator;
use core::marker::Sized;
use core::mem::size_of;
Expand Down Expand Up @@ -131,7 +130,7 @@ mod hack {
use alloc::boxed::Box;
use core::clone::Clone;
#[cfg(test)]
use core::iter::{Iterator, IteratorExt};
use core::iter::Iterator;
use core::mem;
#[cfg(test)]
use core::option::Option::{Some, None};
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/str.rs
Expand Up @@ -58,7 +58,7 @@ use self::DecompositionType::*;

use core::clone::Clone;
use core::iter::AdditiveIterator;
use core::iter::{Iterator, IteratorExt, Extend};
use core::iter::{Iterator, Extend};
use core::option::Option::{self, Some, None};
use core::result::Result;
use core::str as core_str;
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/vec_deque.rs
Expand Up @@ -1785,7 +1785,7 @@ impl<T: fmt::Debug> fmt::Debug for VecDeque<T> {

#[cfg(test)]
mod test {
use core::iter::{IteratorExt, self};
use core::iter::{Iterator, self};
use core::option::Option::Some;

use test;
Expand Down
2 changes: 1 addition & 1 deletion src/libcollectionstest/bench.rs
Expand Up @@ -66,7 +66,7 @@ macro_rules! map_find_rand_bench {
($name: ident, $n: expr, $map: ident) => (
#[bench]
pub fn $name(b: &mut ::test::Bencher) {
use std::iter::IteratorExt;
use std::iter::Iterator;
use std::rand::Rng;
use std::rand;
use std::vec::Vec;
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/fmt/float.rs
Expand Up @@ -17,7 +17,7 @@ pub use self::SignFormat::*;
use char;
use char::CharExt;
use fmt;
use iter::IteratorExt;
use iter::Iterator;
use num::{cast, Float, ToPrimitive};
use num::FpCategory as Fp;
use ops::FnOnce;
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/fmt/mod.rs
Expand Up @@ -15,7 +15,7 @@
use any;
use cell::{Cell, RefCell, Ref, RefMut, BorrowState};
use char::CharExt;
use iter::{Iterator, IteratorExt};
use iter::Iterator;
use marker::{Copy, PhantomData, Sized};
use mem;
use option::Option;
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/fmt/num.rs
Expand Up @@ -15,7 +15,7 @@
#![allow(unsigned_negation)]

use fmt;
use iter::IteratorExt;
use iter::Iterator;
use num::{Int, cast};
use slice::SliceExt;
use str;
Expand Down

0 comments on commit d502f42

Please sign in to comment.