Skip to content

un-double return on try_err #7108

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

Merged
merged 1 commit into from
Apr 18, 2021
Merged

un-double return on try_err #7108

merged 1 commit into from
Apr 18, 2021

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Apr 18, 2021

This fixes #7103 by looking at the parent expression and omitting the "return " in the suggestion when its already a return expression.


changelog: none

@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 Apr 18, 2021
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 18, 2021

📌 Commit 243dc46 has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Apr 18, 2021

⌛ Testing commit 243dc46 with merge c569d33...

@bors
Copy link
Contributor

bors commented Apr 18, 2021

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

@bors bors merged commit c569d33 into master Apr 18, 2021
@flip1995 flip1995 deleted the fix-return-try-err branch May 27, 2021 08:46
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.

applying "try this" from clippy::try_err causes "return return"
4 participants