Skip to content

Commit

Permalink
Move core::iter iterator.rs to traits module
Browse files Browse the repository at this point in the history
  • Loading branch information
clarfonthey committed Jan 22, 2019
1 parent aff7772 commit c40450c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/libcore/iter/mod.rs
Expand Up @@ -309,7 +309,7 @@
use ops::Try;

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

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

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

mod iterator;
mod range;
mod sources;
mod traits;
Expand Down
@@ -1,12 +1,12 @@
use cmp::Ordering;
use ops::Try;

use super::LoopState;
use super::{Chain, Cycle, Copied, Cloned, Enumerate, Filter, FilterMap, Fuse};
use super::{Flatten, FlatMap, flatten_compat};
use super::{Inspect, Map, Peekable, Scan, Skip, SkipWhile, StepBy, Take, TakeWhile, Rev};
use super::{Zip, Sum, Product};
use super::{ChainState, FromIterator, ZipImpl};
use super::super::LoopState;
use super::super::{Chain, Cycle, Copied, Cloned, Enumerate, Filter, FilterMap, Fuse};
use super::super::{Flatten, FlatMap, flatten_compat};
use super::super::{Inspect, Map, Peekable, Scan, Skip, SkipWhile, StepBy, Take, TakeWhile, Rev};
use super::super::{Zip, Sum, Product};
use super::super::{ChainState, FromIterator, ZipImpl};

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

Expand Down
4 changes: 4 additions & 0 deletions src/libcore/iter/traits.rs → src/libcore/iter/traits/mod.rs
Expand Up @@ -3,6 +3,10 @@ use num::Wrapping;

use super::LoopState;

mod iterator;

pub use self::iterator::Iterator;

/// Conversion from an `Iterator`.
///
/// By implementing `FromIterator` for a type, you define how it will be
Expand Down

0 comments on commit c40450c

Please sign in to comment.