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

chore: use char for single char replace pattern #3599

Merged

Conversation

sam-berning
Copy link
Contributor

Description of changes:

check-clippy is failing on #3595 and others due to an unrelated change:

error: single-character string constant used as pattern
  --> api/netdog/src/cli/generate_hostname.rs:58:34
   |
58 |     .unwrap_or(ip_string.replace(":", "-"));
   |                                  ^^^ help: try using a `char` instead: `':'`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
   = note: `-D clippy::single-char-pattern` implied by `-D warnings`

This PR updates the type of the pattern to make clippy happy.

Testing done:

cargo make -e BUILDSYS_VARIANT=aws-dev check-clippy

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Signed-off-by: Sam Berning <bernings@amazon.com>
@sam-berning sam-berning merged commit 26f1cc9 into bottlerocket-os:develop Nov 16, 2023
46 checks passed
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.

None yet

3 participants