From c133651e0a613d4833bba1c1f229222d060e2ba8 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 7 Oct 2020 10:14:42 +0200 Subject: Move IntoIterator into FamousDefs --- crates/assists/src/utils.rs | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'crates/assists') diff --git a/crates/assists/src/utils.rs b/crates/assists/src/utils.rs index 0335969fd..b341453d4 100644 --- a/crates/assists/src/utils.rs +++ b/crates/assists/src/utils.rs @@ -286,14 +286,21 @@ pub mod convert { } pub mod iter { - pub use self::traits::iterator::Iterator; - mod traits { mod iterator { - use crate::option::Option; - pub trait Iterator { - type Item; - fn next(&mut self) -> Option; + pub use self::traits::{collect::IntoIterator, iterator::Iterator}; + mod traits { + mod iterator { + use crate::option::Option; + pub trait Iterator { + type Item; + fn next(&mut self) -> Option; + } + } + mod collect { + pub trait IntoIterator { + type Item; + } } - } } + } pub use self::sources::*; mod sources { @@ -321,7 +328,7 @@ pub mod option { } pub mod prelude { - pub use crate::{convert::From, iter::Iterator, option::Option::{self, *}}; + pub use crate::{convert::From, iter::{IntoIterator, Iterator}, option::Option::{self, *}}; } #[prelude_import] pub use prelude::*; -- cgit v1.2.3