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
In most cases,* if a function requires an argument type to implement Iterator, the function could instead require the argument type to implement IntoIterator.
IntoIteratoris implemented for types that implement Iterator. So the function would accept all the arguments it did before.
But, in addition, the function would accept things like slices, vectors, etc.
In most cases,* if a function requires an argument type to implement
Iterator
, the function could instead require the argument type to implementIntoIterator
.IntoIterator
is implemented for types that implementIterator
. So the function would accept all the arguments it did before.But, in addition, the function would accept things like slices, vectors, etc.
* The one exception I know of is when the
Iterator
bound is needed for another trait. Here is an example: https://github.com/trailofbits/necessist/blob/c17890cf085abbe1c376b75118c354c08f9a6d6f/core/src/core.rs#L406-L412But for a first attempt, this lint could not fire whenever the type parameter appears in another trait bound.
The text was updated successfully, but these errors were encountered: