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 75f15cae62
commit f48b4925c1
27 changed files with 80 additions and 106 deletions
+3 -3
View File
@@ -1137,9 +1137,9 @@ mod tests {
#[test]
fn test_ecdh_shared_secret() {
// Two parties should derive the same shared point
let p = BigUint::from_bytes_be(&EC_P);
let a = BigUint::from_bytes_be(&EC_A);
let g = EcPoint::from_bytes(&EC_GX, &EC_GY);
let _p = BigUint::from_bytes_be(&EC_P);
let _a = BigUint::from_bytes_be(&EC_A);
let _g = EcPoint::from_bytes(&EC_GX, &EC_GY);
let (priv_a, pub_ax, pub_ay) = generate_host_key_pair();
let (priv_b, pub_bx, pub_by) = generate_host_key_pair();
+1 -1
View File
@@ -57,7 +57,7 @@ pub struct DiscEntry {
/// Parse a hex string like "0xABCD..." into bytes.
pub(crate) fn parse_hex(s: &str) -> Option<Vec<u8>> {
let s = s.trim().trim_start_matches("0x").trim_start_matches("0X");
if s.len() % 2 != 0 {
if !s.len().is_multiple_of(2) {
return None;
}
let mut out = Vec::with_capacity(s.len() / 2);