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:
@@ -101,12 +101,7 @@ impl CodecParser for Ac3Parser {
|
||||
|
||||
/// Find AC3/E-AC-3 syncword (0x0B77) in data.
|
||||
fn find_ac3_sync(data: &[u8]) -> Option<usize> {
|
||||
for i in 0..data.len().saturating_sub(1) {
|
||||
if data[i] == 0x0B && data[i + 1] == 0x77 {
|
||||
return Some(i);
|
||||
}
|
||||
}
|
||||
None
|
||||
(0..data.len().saturating_sub(1)).find(|&i| data[i] == 0x0B && data[i + 1] == 0x77)
|
||||
}
|
||||
|
||||
/// Extract bsid from an AC-3/E-AC-3 frame starting at the syncword.
|
||||
|
||||
Reference in New Issue
Block a user