Skip to content

Commit

Permalink
Ignore uninlined_format_args pedantic clippy lint
Browse files Browse the repository at this point in the history
    error: variables can be used directly in the `format!` string
       --> src/main.rs:158:21
        |
    158 |             let _ = writeln!(io::stderr(), "{}", err);
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
        = note: `-D clippy::uninlined-format-args` implied by `-D clippy::pedantic`
    help: change this to
        |
    158 -             let _ = writeln!(io::stderr(), "{}", err);
    158 +             let _ = writeln!(io::stderr(), "{err}");
        |

    error: variables can be used directly in the `format!` string
       --> src/main.rs:251:27
        |
    251 |                 let msg = format!("{}: {}", path.display(), err);
        |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    help: change this to
        |
    251 -                 let msg = format!("{}: {}", path.display(), err);
    251 +                 let msg = format!("{}: {err}", path.display());
        |

    error: variables can be used directly in the `format!` string
       --> src/main.rs:413:19
        |
    413 |         args.push(format!("--color={}", setting).into());
        |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    help: change this to
        |
    413 -         args.push(format!("--color={}", setting).into());
    413 +         args.push(format!("--color={setting}").into());
        |

    error: variables can be used directly in the `format!` string
       --> src/main.rs:443:21
        |
    443 |             let _ = write!(io::stderr(), "{}", line);
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    help: change this to
        |
    443 -             let _ = write!(io::stderr(), "{}", line);
    443 +             let _ = write!(io::stderr(), "{line}");
        |
  • Loading branch information
dtolnay committed Oct 8, 2022
1 parent 5fcb96e commit 4f659e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#![allow(
clippy::cast_precision_loss,
clippy::let_underscore_drop,
clippy::uninlined_format_args,
clippy::unseparated_literal_suffix
)]

Expand Down

0 comments on commit 4f659e3

Please sign in to comment.