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

clippy: use replace with arg-list #472

Merged
merged 1 commit into from
Oct 11, 2022
Merged

clippy: use replace with arg-list #472

merged 1 commit into from
Oct 11, 2022

Conversation

darnuria
Copy link
Contributor

Rationale:

warning: used consecutive `str::replace` call
   --> src/resources.rs:499:10
    |
499 |     name.replace(' ', "_").replace('.', "_").to_lowercase()
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace([' ', '.'], "_")`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace
    = note: `#[warn(clippy::collapsible_str_replace)]` on by default

Rationale:
```
warning: used consecutive `str::replace` call
   --> src/resources.rs:499:10
    |
499 |     name.replace(' ', "_").replace('.', "_").to_lowercase()
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace([' ', '.'], "_")`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_str_replace
    = note: `#[warn(clippy::collapsible_str_replace)]` on by default
```
@darnuria
Copy link
Contributor Author

(just seen the bevy rewrite no problem to close ;))

@orhun orhun changed the title [clippy] use replace with arg-list. clippy: use replace with arg-list Oct 11, 2022
@orhun orhun merged commit ce48a62 into fishfolk:main Oct 11, 2022
@darnuria darnuria deleted the clippy/replace branch October 11, 2022 19:22
@darnuria
Copy link
Contributor Author

Thanks for review and the game. :)

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

2 participants