Skip to main content

Lint clippy::unnecessary_debug_formatting

warning clippy::unnecessary_debug_formatting §

unnecessary `Debug` formatting in `format!` args

src/render/pages.rs:618:32

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

Targets (1)
  • cargo-clippy-html (bin)

Primary: src/render/pages.rs:618:32

            .map(|a| format!("{a:?}"))

help: use `Display` formatting and change this to `a.display()`

note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed

help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#unnecessary_debug_formatting

note: `-W clippy::unnecessary-debug-formatting` implied by `-W clippy::pedantic`

help: to override `-W clippy::pedantic` add `#[allow(clippy::unnecessary_debug_formatting)]`

Rendered diagnostic (text)
warning: unnecessary `Debug` formatting in `format!` args
   --> src/render/pages.rs:618:32
    |
618 |             .map(|a| format!("{a:?}"))
    |                                ^
    |
    = help: use `Display` formatting and change this to `a.display()`
    = note: switching to `Display` formatting will change how the value is shown; escaped characters will no longer be escaped and surrounding quotes will be removed
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#unnecessary_debug_formatting
    = note: `-W clippy::unnecessary-debug-formatting` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::unnecessary_debug_formatting)]`