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
If we want to have something like an iterator that starts with certain item and then continues with another range of items, we can do something like chaining an iterator to an option:
What it does
If we want to have something like an iterator that starts with certain item and then continues with another range of items, we can do something like chaining an iterator to an option:
Although it does not make a lot of sense, this works with
None
as well but the first item will not be saved in the iterator.I wonder if it makes sense to lint something like
None.(into_)iter()
and suggeststd::iter::empty
or removing the code entirely.Lint Name
none_to_iter? none_into_iter?
Category
style, complexity
Advantage
No response
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: