Skip to content

Commit c40450c

Browse files
author
Clar Fon
committed
Move core::iter iterator.rs to traits module
1 parent aff7772 commit c40450c

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

src/libcore/iter/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309
use ops::Try;
310310

311311
#[stable(feature = "rust1", since = "1.0.0")]
312-
pub use self::iterator::Iterator;
312+
pub use self::traits::Iterator;
313313

314314
#[unstable(feature = "step_trait",
315315
reason = "likely to be replaced by finer-grained traits",
@@ -355,7 +355,6 @@ pub use self::adapters::Copied;
355355

356356
use self::adapters::{flatten_compat, ChainState, ZipImpl};
357357

358-
mod iterator;
359358
mod range;
360359
mod sources;
361360
mod traits;

src/libcore/iter/iterator.rs renamed to src/libcore/iter/traits/iterator.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use cmp::Ordering;
22
use ops::Try;
33

4-
use super::LoopState;
5-
use super::{Chain, Cycle, Copied, Cloned, Enumerate, Filter, FilterMap, Fuse};
6-
use super::{Flatten, FlatMap, flatten_compat};
7-
use super::{Inspect, Map, Peekable, Scan, Skip, SkipWhile, StepBy, Take, TakeWhile, Rev};
8-
use super::{Zip, Sum, Product};
9-
use super::{ChainState, FromIterator, ZipImpl};
4+
use super::super::LoopState;
5+
use super::super::{Chain, Cycle, Copied, Cloned, Enumerate, Filter, FilterMap, Fuse};
6+
use super::super::{Flatten, FlatMap, flatten_compat};
7+
use super::super::{Inspect, Map, Peekable, Scan, Skip, SkipWhile, StepBy, Take, TakeWhile, Rev};
8+
use super::super::{Zip, Sum, Product};
9+
use super::super::{ChainState, FromIterator, ZipImpl};
1010

1111
fn _assert_is_object_safe(_: &dyn Iterator<Item=()>) {}
1212

src/libcore/iter/traits.rs renamed to src/libcore/iter/traits/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ use num::Wrapping;
33

44
use super::LoopState;
55

6+
mod iterator;
7+
8+
pub use self::iterator::Iterator;
9+
610
/// Conversion from an `Iterator`.
711
///
812
/// By implementing `FromIterator` for a type, you define how it will be

0 commit comments

Comments
 (0)