-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lint suggestion: use .collect() instead of ::from_iter() #5679
Comments
See also the documentation of |
True, the documentation already mentions this, but it is not visible when you find the method in the list of traits a type implements. Actually, I just realized that this is more general. I have also seen people explicitly use |
Would it be okay if I gave this one a try? |
Go ahead! |
@siyopao Still working on it or can I give it a try? |
Hi @pitiK3U, sorry, yes, please go ahead. |
When the user writes, say,
HashMap::from_iter($iter_expr)
, suggest$iter_expr.collect()
.This would be primarily beneficial to beginners. In fact, I've just seen this in the wild on Exercism ;)
The text was updated successfully, but these errors were encountered: