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 the trait implementation is missing it suggests adding it by forwarding to the method (can be automated).
If the trait implementation is present but the inherent method is not suggest adding it forwarding to trait implementation.
Same for mutable versions.
Both of these APIs are idiomatic.
Probably should be only triggered for public T.
Lint Name
impl_iter_into_iterator
Category
style
Advantage
The API is idiomatic and intuitive because all types in std and many other crates behave the same
It's possible to pass &T to for or functions expecting IntoIterator avoiding typing .iter()
Drawbacks
Increases boilerplate in the library
Example
pubstructFoo([u8;32]);implFoo{fniter(&self) -> Iter<'_>{// Iter implements Iterator<Item=&u8>Iter::new(&self.0)}}