diff options
| author | Clar Fon <them@lightdark.xyz> | 2018-12-17 17:24:57 -0500 |
|---|---|---|
| committer | Clar Fon <them@lightdark.xyz> | 2019-01-22 17:45:11 -0500 |
| commit | c40450ce65d11e771a32feaa8a1df9dbea480486 (patch) | |
| tree | 8b152e80213e73c4861d28e0a12fea2f72d462b5 | |
| parent | aff7772a1da244af8a37c786c6c7cb87747b9d02 (diff) | |
| download | rust-c40450ce65d11e771a32feaa8a1df9dbea480486.tar.gz rust-c40450ce65d11e771a32feaa8a1df9dbea480486.zip | |
Move core::iter iterator.rs to traits module
| -rw-r--r-- | src/libcore/iter/mod.rs | 3 | ||||
| -rw-r--r-- | src/libcore/iter/traits/iterator.rs (renamed from src/libcore/iter/iterator.rs) | 12 | ||||
| -rw-r--r-- | src/libcore/iter/traits/mod.rs (renamed from src/libcore/iter/traits.rs) | 4 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/libcore/iter/mod.rs b/src/libcore/iter/mod.rs index bc8760934d2..6dc7469998c 100644 --- a/src/libcore/iter/mod.rs +++ b/src/libcore/iter/mod.rs @@ -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", @@ -355,7 +355,6 @@ pub use self::adapters::Copied; use self::adapters::{flatten_compat, ChainState, ZipImpl}; -mod iterator; mod range; mod sources; mod traits; diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/traits/iterator.rs index ac21586c0b8..0ce817d02a5 100644 --- a/src/libcore/iter/iterator.rs +++ b/src/libcore/iter/traits/iterator.rs @@ -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=()>) {} diff --git a/src/libcore/iter/traits.rs b/src/libcore/iter/traits/mod.rs index e8c6cd8b79c..742540681b4 100644 --- a/src/libcore/iter/traits.rs +++ b/src/libcore/iter/traits/mod.rs @@ -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 |
