Zero clippy warnings: fix all 32 remaining

- Iterator::find() replaces manual loops (6 sites)
- Index-only loops → iterators (4 sites)
- Identical if-blocks merged
- Box large MkvStream WriteState enum variant
- Vec macro initializers, late init fixes
- Unused fields prefixed with underscore (format spec fields)
- Dead code removed or documented

0 clippy warnings. 319 tests passing.
This commit is contained in:
MattJackson
2026-04-11 19:33:13 +00:00
parent a74d395f68
commit 8441b0e9b1
27 changed files with 80 additions and 106 deletions
+2
View File
@@ -19,6 +19,7 @@ use crate::udf::UdfFs;
/// A stream label extracted from disc config files.
#[derive(Debug, Clone)]
#[allow(dead_code)]
pub struct StreamLabel {
/// STN index (1-based)
pub stream_number: u16,
@@ -45,6 +46,7 @@ pub enum StreamLabelType {
}
#[derive(Debug, Clone, Copy, PartialEq)]
#[allow(dead_code)]
pub enum LabelPurpose {
Normal,
Commentary,
+2 -6
View File
@@ -108,9 +108,7 @@ fn parse_token(s: &str) -> Option<StreamLabel> {
} else if part == "ACOM" {
purpose = LabelPurpose::Commentary;
is_audio = true;
} else if part == "ADLG" {
is_audio = true;
} else if part == "ATRI" {
} else if part == "ADLG" || part == "ATRI" {
is_audio = true;
} else if part == "SDH" {
qualifier = LabelQualifier::Sdh;
@@ -120,9 +118,7 @@ fn parse_token(s: &str) -> Option<StreamLabel> {
} else if part == "SCOM" {
purpose = LabelPurpose::Commentary;
is_subtitle = true;
} else if part == "STRI" {
is_subtitle = true;
} else if part == "TXT" {
} else if part == "STRI" || part == "TXT" {
is_subtitle = true;
} else if part == "FOR" {
qualifier = LabelQualifier::Forced;