diff options
Diffstat (limited to 'crates/assists/src')
-rw-r--r-- | crates/assists/src/utils.rs | 23 |
1 files changed, 15 insertions, 8 deletions
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 { | |||
286 | } | 286 | } |
287 | 287 | ||
288 | pub mod iter { | 288 | pub mod iter { |
289 | pub use self::traits::iterator::Iterator; | 289 | pub use self::traits::{collect::IntoIterator, iterator::Iterator}; |
290 | mod traits { mod iterator { | 290 | mod traits { |
291 | use crate::option::Option; | 291 | mod iterator { |
292 | pub trait Iterator { | 292 | use crate::option::Option; |
293 | type Item; | 293 | pub trait Iterator { |
294 | fn next(&mut self) -> Option<Self::Item>; | 294 | type Item; |
295 | fn next(&mut self) -> Option<Self::Item>; | ||
296 | } | ||
297 | } | ||
298 | mod collect { | ||
299 | pub trait IntoIterator { | ||
300 | type Item; | ||
301 | } | ||
295 | } | 302 | } |
296 | } } | 303 | } |
297 | 304 | ||
298 | pub use self::sources::*; | 305 | pub use self::sources::*; |
299 | mod sources { | 306 | mod sources { |
@@ -321,7 +328,7 @@ pub mod option { | |||
321 | } | 328 | } |
322 | 329 | ||
323 | pub mod prelude { | 330 | pub mod prelude { |
324 | pub use crate::{convert::From, iter::Iterator, option::Option::{self, *}}; | 331 | pub use crate::{convert::From, iter::{IntoIterator, Iterator}, option::Option::{self, *}}; |
325 | } | 332 | } |
326 | #[prelude_import] | 333 | #[prelude_import] |
327 | pub use prelude::*; | 334 | pub use prelude::*; |