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

led: extras: fix cargo clippy complaining about String construction #49

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

hnez
Copy link
Member

@hnez hnez commented Oct 6, 2023

The latest cargo clippy learned a new trick to optimize the construction of Strings and will not give us green CI builds before we adapt to it.

  • Does this make a difference in this case performance wise? No
  • Does this make cargo clippy happy? Yes

So let's do it.

…ld String

Use Iterator::fold() and write! instead.

Does this make a difference in this case performance wise? No
Does this make cargo clippy happy? Yes

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Copy link
Member

@KarlK90 KarlK90 left a comment

Choose a reason for hiding this comment

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

lgtm!

@hnez hnez merged commit cca43b5 into linux-automation:main Oct 6, 2023
9 of 10 checks passed
@hnez hnez deleted the cargo-clippy-leds branch October 6, 2023 13:24
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