Skip to content

Commit 7a3d445

Browse files
committed
Resolve dead code warnings in agenda-generator
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
1 parent 636682f commit 7a3d445

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

tools/agenda-generator/src/generator.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,6 @@ impl GithubQuery {
524524
}
525525

526526
fn write(&mut self, generator: &mut Generator) -> Result<()> {
527-
let mut empty = true;
528527
for repo in &self.repos {
529528
for labels in &self.labels {
530529
let cs_labels = labels.join(",");
@@ -589,19 +588,9 @@ impl GithubQuery {
589588
}
590589
}
591590

592-
#[derive(Debug)]
593-
struct Fcp<'a> {
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,
601-
}
602-
603591
#[derive(Debug, Deserialize)]
604592
struct Issue {
593+
#[allow(dead_code)]
605594
number: u32,
606595
html_url: String,
607596
title: String,

0 commit comments

Comments
 (0)