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 clippy issues. #357

Merged
merged 1 commit into from
Sep 7, 2024
Merged

Conversation

jsuereth
Copy link
Contributor

@jsuereth jsuereth commented Sep 6, 2024

It looks like some new checks/improvements are made of this variety:

  • Use y.clone_into(x) instead of x = y.to_owned()
  • Don't borrow unless you need to.
  • Use character literals instead of string literals of size 1

@jsuereth jsuereth requested a review from a team September 6, 2024 21:17
@jsuereth
Copy link
Contributor Author

jsuereth commented Sep 6, 2024

Another quick note: I disabled some clone vs. to_owned checks in the comment filter, as we would need a mutable-borrow version of trim for no great reason. We COULD create such a function, but I think the current performance hint is minimal for codegen and we can address that in the future.

@jsuereth jsuereth merged commit 2074ecb into open-telemetry:main Sep 7, 2024
21 checks passed
@jsuereth jsuereth deleted the wip-fix-clippy branch September 7, 2024 23:12
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