-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Purge map(|&x| x)
et al
#22243
Comments
kmcallister
added
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
labels
Feb 13, 2015
ruuda
added a commit
to ruuda/rust
that referenced
this issue
Feb 13, 2015
This resolves rust-lang#22243, at least for one-letter variable names.
Closed
steveklabnik
pushed a commit
to steveklabnik/rust
that referenced
this issue
Feb 13, 2015
This partially resolves rust-lang#22243.
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
Feb 13, 2015
This resolves rust-lang#22243 for the single-letter variables that I could grep. Some occurences could not be replaced.
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
Feb 14, 2015
This resolves rust-lang#22243 for the single-letter variables that I could grep. Some occurences could not be replaced.
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
Feb 15, 2015
This resolves rust-lang#22243 for the single-letter variables that I could grep. Some occurences could not be replaced.
There are two or three occurrences of code like this:
Should they also be replaced? Also, |
It can be converted to |
bombless
pushed a commit
to bombless/rust
that referenced
this issue
Feb 23, 2015
Calling this sufficiently resolved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Option and IteratorExt both have
.cloned()
which is sugar for this operation.AKA
.map(|x| *x)
.map(|x| x.clone())
.map(|x| (*x).clone())
(yes, really)The text was updated successfully, but these errors were encountered: