Rollup merge of #77697 - WaffleLapkin:iter_split_adaptors, r=m-ou-se
Split each iterator adapter and source into individual modules This PR creates individual modules for each iterator adapter and iterator source. This is done to enhance the readability of corresponding modules (`adapters/mod.rs` and `sources.rs`) which were hard to navigate and read because of lots of repeated lines (e.g.: `adapters/mod.rs` was 3k lines long). This is also in line with some adapters which already had their own modules (`Flatten`, `FlatMap`, `Chain`, `Zip`, `Fuse`). This PR also makes `Take`s adapter fields private (I have no idea why they were `pub(super)` before). r? ``@LukasKalbertodt``
This commit is contained in:
commit
4407049fcb
33 changed files with 3575 additions and 3467 deletions
|
|
@ -13,11 +13,13 @@ error[E0599]: no method named `collect` found for struct `Cloned<TakeWhile<&mut
|
|||
LL | .collect();
|
||||
| ^^^^^^^ method not found in `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>`
|
||||
|
|
||||
::: $SRC_DIR/core/src/iter/adapters/mod.rs:LL:COL
|
||||
::: $SRC_DIR/core/src/iter/adapters/cloned.rs:LL:COL
|
||||
|
|
||||
LL | pub struct Cloned<I> {
|
||||
| -------------------- doesn't satisfy `_: Iterator`
|
||||
...
|
||||
|
|
||||
::: $SRC_DIR/core/src/iter/adapters/take_while.rs:LL:COL
|
||||
|
|
||||
LL | pub struct TakeWhile<I, P> {
|
||||
| -------------------------- doesn't satisfy `<_ as Iterator>::Item = &_`
|
||||
|
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ LL | once::<&str>("str").fuse().filter(|a: &str| true).count();
|
|||
| doesn't satisfy `<_ as FnOnce<(&&str,)>>::Output = bool`
|
||||
| doesn't satisfy `_: FnMut<(&&str,)>`
|
||||
|
|
||||
::: $SRC_DIR/core/src/iter/adapters/mod.rs:LL:COL
|
||||
::: $SRC_DIR/core/src/iter/adapters/filter.rs:LL:COL
|
||||
|
|
||||
LL | pub struct Filter<I, P> {
|
||||
| ----------------------- doesn't satisfy `_: Iterator`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue