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

minor: Remove unneeded conversions #18793

Merged
merged 1 commit into from
Dec 30, 2024
Merged

Conversation

ChayimFriedman2
Copy link
Contributor

Noticed thanks to hover when browsing in the repo.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 30, 2024
@Veykril
Copy link
Member

Veykril commented Dec 30, 2024

Surprised clippy doesn't catch that

@Veykril Veykril added this pull request to the merge queue Dec 30, 2024
@ChayimFriedman2
Copy link
Contributor Author

In general it cannot, passing the reflexive from is sometimes sensible (I think?) Maybe it can detect with Option::map() though.

@Veykril
Copy link
Member

Veykril commented Dec 30, 2024

It does usually catch no-op from/into calls )from what I remember), though I suppose it might not when its used as a function pointer.

@ChayimFriedman2
Copy link
Contributor Author

It does when they are called directly, it can't generally when they are passed as higher-order functions.

Merged via the queue into rust-lang:master with commit 8318875 Dec 30, 2024
9 checks passed
@ChayimFriedman2 ChayimFriedman2 deleted the fixup branch December 30, 2024 11:36
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.

3 participants