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 unnecessary clones #484

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Conversation

matthiasgoergens
Copy link
Collaborator

@matthiasgoergens matthiasgoergens commented Oct 28, 2024

Copy-and-paste coding, again. See 47f5572 / #463

This PR only patches up the unnecessary clone, it doesn't fix the code-duplication-with-small-variations that's the actual problem with our pervasive copy-and-paste culture.

Copy-and-paste coding, again.  See 47f5572 / #463
@zemse
Copy link
Collaborator

zemse commented Oct 28, 2024

Interesting why it did now show up in cargo check.

@matthiasgoergens matthiasgoergens merged commit e949246 into master Oct 28, 2024
6 checks passed
@matthiasgoergens matthiasgoergens deleted the matthias/fix-copy-and-paste branch October 28, 2024 12:03
@matthiasgoergens
Copy link
Collaborator Author

Yes, I'm also a bit confused about why cargo clippy or cargo check didn't complain.

Overall, the extra clones themselves aren't a big deal, but they highlight that we rely too much on copy-and-paste, and not enough on carefully reading the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants