You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning: an inclusive range would be more readable
--> src/main.rs:4:5
|
4 | (0..1 + 1).into_par_iter();
| ^^^^^^^^^^ help: use: `(0..=1)`
|
= note: #[warn(clippy::range_plus_one)] on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one
However, applying the suggestion results in the following error:
error[E0599]: no method named `into_par_iter` found for type `std::ops::RangeInclusive<{integer}>` in the current scope
--> src/main.rs:4:13
|
4 | (0..=1).into_par_iter();
| ^^^^^^^^^^^^^
|
= note: the method `into_par_iter` exists but the following trait bounds were not satisfied:
`std::ops::RangeInclusive<{integer}> : rayon::iter::IntoParallelIterator`
`&std::ops::RangeInclusive<{integer}> : rayon::iter::IntoParallelIterator`
`&mut std::ops::RangeInclusive<{integer}> : rayon::iter::IntoParallelIterator`
The following program compiles, but clippy produces a warning on it:
The warning is:
However, applying the suggestion results in the following error:
See also the rayon documentation for ranges.
I hope this can be fixed or at least added to the "Known Problems" section for this lint, which is currently empty.
The text was updated successfully, but these errors were encountered: