Skip to main content

Lint clippy::struct_field_names

warning clippy::struct_field_names §

field name ends with the struct's name

src/render/pages.rs:39:5

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

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

Primary: src/render/pages.rs:39:5

    source_page: bool,

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

note: `-W clippy::struct-field-names` implied by `-W clippy::pedantic`

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

Rendered diagnostic (text)
warning: field name ends with the struct's name
  --> src/render/pages.rs:39:5
   |
39 |     source_page: bool,
   |     ^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#struct_field_names
   = note: `-W clippy::struct-field-names` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::struct_field_names)]`

warning clippy::struct_field_names §

field name ends with the struct's name

src/render/pages.rs:40:5

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

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

Primary: src/render/pages.rs:40:5

    standalone_page: bool,

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

Rendered diagnostic (text)
warning: field name ends with the struct's name
  --> src/render/pages.rs:40:5
   |
40 |     standalone_page: bool,
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#struct_field_names

warning clippy::struct_field_names §

all fields have the same postfix: `pages`

src/render/paths.rs:7:1

Clippy · Category: pedantic · cargo-clippy-html

Official Clippy documentation

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

Primary: src/render/paths.rs:7:1

pub struct PageMap {
    pub category_pages: BTreeMap<String, PathBuf>,
    pub lint_pages: BTreeMap<String, PathBuf>,
    pub source_pages: BTreeMap<PathBuf, PathBuf>,
}

help: remove the postfixes

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

Rendered diagnostic (text)
warning: all fields have the same postfix: `pages`
  --> src/render/paths.rs:7:1
   |
 7 | / pub struct PageMap {
 8 | |     pub category_pages: BTreeMap<String, PathBuf>,
 9 | |     pub lint_pages: BTreeMap<String, PathBuf>,
10 | |     pub source_pages: BTreeMap<PathBuf, PathBuf>,
11 | | }
   | |_^
   |
   = help: remove the postfixes
   = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.100.0/index.html#struct_field_names