I am going through a tutorial on how to implement IntoIterator for a custom collection, like here. I have a query.
Why do we implement it for &T, and not T?
User may want to call into_iter on collection directly, isn’t?
I am going through a tutorial on how to implement IntoIterator for a custom collection, like here. I have a query.
Why do we implement it for &T, and not T?
User may want to call into_iter on collection directly, isn’t?