rust-lang / libs-team

The home of the library team
Apache License 2.0
115 stars 18 forks source link

Resolve dead code warnings in agenda-generator #299

Closed dtolnay closed 9 months ago

dtolnay commented 9 months ago
warning: unused variable: `empty`
   --> src/generator.rs:527:17
    |
527 |         let mut empty = true;
    |                 ^^^^^ help: if this is intentional, prefix it with an underscore: `_empty`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: variable does not need to be mutable
   --> src/generator.rs:527:13
    |
527 |         let mut empty = true;
    |             ----^^^^^
    |             |
    |             help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default

warning: multiple fields are never read
   --> src/generator.rs:594:5
    |
593 | struct Fcp<'a> {
    |        --- fields in this struct
594 |     title: &'a str,
    |     ^^^^^
595 |     repo: &'a str,
    |     ^^^^
596 |     number: &'a str,
    |     ^^^^^^
597 |     disposition: &'a str,
    |     ^^^^^^^^^^^
598 |     url: &'a str,
    |     ^^^
599 |     reviewers: Vec<&'a str>,
    |     ^^^^^^^^^
600 |     concerns: bool,
    |     ^^^^^^^^
    |
    = note: `Fcp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
    = note: `#[warn(dead_code)]` on by default

warning: field `number` is never read
   --> src/generator.rs:605:5
    |
604 | struct Issue {
    |        ----- field in this struct
605 |     number: u32,
    |     ^^^^^^
    |
    = note: `Issue` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

empty used to be used prior to 3b4f88ae1db192d91f6fc50308d53cec7de4a3cc.

Fcp used to be used prior to #22.