Skip to content
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

Fix suggestion to add unneeded space in manual_async #6294

Merged

Conversation

giraffate
Copy link
Contributor

Fix a same case as #6247

changelog: Fix suggestion to add unneeded space in manual_async

@rust-highfive
Copy link

r? @Manishearth

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Nov 5, 2020
Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code seems fine, would like it to be a common function

if let Some(ret_pos) = header_snip.rfind("->");
if let Some(ret_pos) = header_snip.rfind("->").map(|rpos| {
let mut rpos = rpos;
let chars: Vec<char> = header_snip.chars().collect();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you refactor this into something for utils so #6247 can also use it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your review! I refactored this.

@giraffate giraffate force-pushed the fix_suggestion_to_add_space_in_manual_async branch from ef946b7 to b7892c6 Compare November 6, 2020 13:55
@Manishearth
Copy link
Member

@bors r+

i was wondering what a good name for the function would be but this is as good as any

@bors
Copy link
Contributor

bors commented Nov 6, 2020

📌 Commit b7892c6 has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Nov 6, 2020

⌛ Testing commit b7892c6 with merge 2ea08e1...

@bors
Copy link
Contributor

bors commented Nov 6, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 2ea08e1 to master...

@bors bors merged commit 2ea08e1 into rust-lang:master Nov 6, 2020
@giraffate giraffate deleted the fix_suggestion_to_add_space_in_manual_async branch November 7, 2020 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants