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

Remove redundant clones. #506

Merged
merged 1 commit into from
Jun 24, 2024
Merged

Remove redundant clones. #506

merged 1 commit into from
Jun 24, 2024

Conversation

SamirTalwar
Copy link
Contributor

What

I noticed a few extra calls to .clone() while working on an unrelated refactor. I want to remove them for brevity and simplicity; I don't expect a performance improvement.

This turns on the Clippy warning redundant_clone, which detects unnecessary calls to .clone() (and .to_string()).

It is an unstable warning and so might reports some false positives. If we find any, we can suppress the warning there.

How

I turned the warning on and applied fixes everywhere.

I also saw a few that the lint didn't catch, which I fixed myself.

This turns on the Clippy warning `redundant_clone`, which detects
unnecessary calls to `.clone()` (and `.to_string()`).

It is an unstable warning and so might reports some false positives. If
we find any, we can suppress the warning there.
@SamirTalwar SamirTalwar requested a review from a team June 24, 2024 06:52
Copy link
Collaborator

@soupi soupi left a comment

Choose a reason for hiding this comment

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

Cool.

@SamirTalwar SamirTalwar added this pull request to the merge queue Jun 24, 2024
Merged via the queue into main with commit 09cf76c Jun 24, 2024
35 checks passed
@SamirTalwar SamirTalwar deleted the samirtalwar/remove-clones branch June 24, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants