Skip to content

style: Push single character instead of string #87

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

caspermeijn
Copy link
Contributor

This solves clippy warnings like this:

error: calling `push_str()` using a single-character string literal
   --> src/common.rs:222:13
    |
222 |             result.push_str("\n");
    |             ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
    = note: `-D clippy::single-char-add-str` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::single_char_add_str)]`

This solves clippy warnings like this:
```
error: calling `push_str()` using a single-character string literal
   --> src/common.rs:222:13
    |
222 |             result.push_str("\n");
    |             ^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `result.push('\n')`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
    = note: `-D clippy::single-char-add-str` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::single_char_add_str)]`
```
@LegNeato LegNeato merged commit eb2d753 into graphql-rust:master Jan 16, 2025
3 checks passed
@caspermeijn caspermeijn deleted the single_char_add_str branch February 3, 2025 13:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants