Skip to content

Commit

Permalink
Ignore format_push_string pedantic clippy lint
Browse files Browse the repository at this point in the history
    warning: `format!(..)` appended to existing `String`
      --> src/css.rs:12:9
       |
    12 |         styles += &format!("a.struct[title=\"struct syn::token::{ty}\"],\n");
       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: consider using `write!` to avoid the extra allocation
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
       = note: `-W clippy::format-push-string` implied by `-W clippy::pedantic`
       = help: to override `-W clippy::pedantic` add `#[allow(clippy::format_push_string)]`

    warning: `format!(..)` appended to existing `String`
      --> src/css.rs:24:9
       |
    24 |         styles += &format!("a.struct[title=\"struct syn::token::{ty}\"]::before,\n");
       |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: consider using `write!` to avoid the extra allocation
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string

    warning: `format!(..)` appended to existing `String`
      --> src/css.rs:40:9
       |
    40 | /         styles += &match Ord::cmp(&macro_len, &ty_len) {
    41 | |             Ordering::Less => {
    42 | |                 shrink
    43 | |                     .entry((macro_len, ty_len))
    ...  |
    63 | |         };
       | |_________^
       |
       = help: consider using `write!` to avoid the extra allocation
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string

    warning: `format!(..)` appended to existing `String`
      --> src/css.rs:67:13
       |
    67 |             styles += &format!("\na.struct[title=\"struct syn::token::{ty}\"],");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: consider using `write!` to avoid the extra allocation
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string

    warning: `format!(..)` appended to existing `String`
      --> src/css.rs:70:9
       |
    70 | /         styles += &formatdoc! {"
    71 | |              {{
    72 | |             \tfont-size: calc(100% * {macro_len} / {ty_len});
    73 | |             }}
    74 | |         "};
       | |__________^
       |
       = help: consider using `write!` to avoid the extra allocation
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string

    warning: `format!(..)` appended to existing `String`
      --> src/css.rs:78:13
       |
    78 |             styles += &format!("\na.struct[title=\"struct syn::token::{ty}\"]::after,");
       |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = help: consider using `write!` to avoid the extra allocation
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string

    warning: `format!(..)` appended to existing `String`
      --> src/css.rs:82:9
       |
    82 | /         styles += &formatdoc! {"
    83 | |              {{
    84 | |             \tcontent: \"{padding}\";
    85 | |             }}
    86 | |         "};
       | |__________^
       |
       = help: consider using `write!` to avoid the extra allocation
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
  • Loading branch information
dtolnay committed Feb 8, 2025
1 parent f3614ce commit af12bda
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions codegen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// programmatically from the syntax tree description.

#![allow(
clippy::format_push_string,
clippy::items_after_statements,
clippy::manual_let_else,
clippy::match_like_matches_macro,
Expand Down

0 comments on commit af12bda

Please sign in to comment.