v0.11.15: lint cleanup — fmt + clippy clean

This commit is contained in:
Matt Jackson
2026-04-21 18:52:55 +00:00
parent afae37c8c3
commit 8843833ea7
16 changed files with 108 additions and 63 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ impl CodecParser for Mpeg2Parser {
bits += 64 * 8;
}
}
let total_bytes = 4 + ((bits + 7) / 8) as usize;
let total_bytes = 4 + bits.div_ceil(8) as usize;
(sc + total_bytes).min(data.len())
}
}
+9 -12
View File
@@ -50,30 +50,27 @@ impl TrueHdParser {
0 => {
// 48 kHz
static SIZES: [usize; 38] = [
64, 64, 80, 80, 96, 96, 112, 112, 128, 128,
160, 160, 192, 192, 224, 224, 256, 256, 320, 320,
384, 384, 448, 448, 512, 512, 640, 640, 768, 768,
896, 896, 1024, 1024, 1152, 1152, 1280, 1280,
64, 64, 80, 80, 96, 96, 112, 112, 128, 128, 160, 160, 192, 192, 224, 224, 256,
256, 320, 320, 384, 384, 448, 448, 512, 512, 640, 640, 768, 768, 896, 896,
1024, 1024, 1152, 1152, 1280, 1280,
];
SIZES.get(frmsizecod).copied().unwrap_or(0)
}
1 => {
// 44.1 kHz
static SIZES: [usize; 38] = [
69, 70, 87, 88, 104, 105, 121, 122, 139, 140,
174, 175, 208, 209, 243, 244, 278, 279, 348, 349,
417, 418, 487, 488, 557, 558, 696, 697, 835, 836,
975, 976, 1114, 1115, 1253, 1254, 1393, 1394,
69, 70, 87, 88, 104, 105, 121, 122, 139, 140, 174, 175, 208, 209, 243, 244,
278, 279, 348, 349, 417, 418, 487, 488, 557, 558, 696, 697, 835, 836, 975, 976,
1114, 1115, 1253, 1254, 1393, 1394,
];
SIZES.get(frmsizecod).copied().unwrap_or(0)
}
2 => {
// 32 kHz
static SIZES: [usize; 38] = [
96, 96, 120, 120, 144, 144, 168, 168, 192, 192,
240, 240, 288, 288, 336, 336, 384, 384, 480, 480,
576, 576, 672, 672, 768, 768, 960, 960, 1152, 1152,
1344, 1344, 1536, 1536, 1728, 1728, 1920, 1920,
96, 96, 120, 120, 144, 144, 168, 168, 192, 192, 240, 240, 288, 288, 336, 336,
384, 384, 480, 480, 576, 576, 672, 672, 768, 768, 960, 960, 1152, 1152, 1344,
1344, 1536, 1536, 1728, 1728, 1920, 1920,
];
SIZES.get(frmsizecod).copied().unwrap_or(0)
}