Refactored while_some (libstd/option.rs)#12871
Closed
aochagavia wants to merge 1 commit into
Closed
Conversation
Member
|
The PR title/description listed is quite nice, but it seems to be missing from the commit message itself. Could you put the two in sync? |
Contributor
Author
|
How can I do that? I am not very experienced with GitHub and pull requests... |
Member
|
You can use |
The old 'while' needed to match 2 times for each iteration. With the new 'loop' there is just one match needed. I have also replaced 'blk' by 'f' to be more consistent with parameter names in other functions that are implemented for Option
Contributor
Author
|
Is this what you mean? |
bors
added a commit
that referenced
this pull request
Mar 14, 2014
…chton The old 'while' needed to match 2 times for each iteration. With the new 'loop' there is just one match needed. I have also replaced 'blk' by 'f' to be more consistent with parameter names in other functions that are implemented for Option<T>
fasterthanlime
pushed a commit
to fasterthanlime/rust
that referenced
this pull request
Jul 26, 2022
…ykril Sync from `rust-lang/rust` This is the first subtree sync PR from `rust-lang/rust` to `rust-lang/rust-analyzer`, made by following the instructions at: https://doc.rust-lang.org/nightly/clippy/development/infrastructure/sync.html#performing-the-sync-from-rust-langrust-to-clippy It includes all the commits that were made in: * rust-lang#99603 (And that were reviewed ahead of time by `@Veykril` + `@lnicola)`
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Jun 13, 2024
Modify str_to_string to be machine-applicable Fixes rust-lang/rust-clippy#12768 I'm not sure if there is any potential for edge cases with this - since it only ever acts on `&str` types I can't think of any, and especially since the methods do the same thing anyway. changelog: allow `str_to_string` lint to be automatically applied
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The old 'while' needed to match 2 times for each iteration. With the new 'loop' there is just one match needed.
I have also replaced 'blk' by 'f' to be more consistent with parameter names in other functions that are implemented for Option