aboutsummaryrefslogtreecommitdiff
path: root/crates/assists
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2020-10-07 09:14:42 +0100
committerLukas Wirth <[email protected]>2020-10-07 09:14:42 +0100
commitc133651e0a613d4833bba1c1f229222d060e2ba8 (patch)
tree8e9ab96b46398fa1291164543d437703ef1ad58d /crates/assists
parentc6f1de6ac5d3496fc3c30b5e15263db68d057695 (diff)
Move IntoIterator into FamousDefs
Diffstat (limited to 'crates/assists')
-rw-r--r--crates/assists/src/utils.rs23
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
288pub mod iter { 288pub 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
323pub mod prelude { 330pub 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]
327pub use prelude::*; 334pub use prelude::*;