fix: refactor to avoid circular dependencies
This commit is contained in:
@@ -88,12 +88,9 @@ fn find_footer(data: &[u8]) -> Option<usize> {
|
||||
if data.len() < 2 {
|
||||
return None;
|
||||
}
|
||||
for i in 2..data.len() - 1 {
|
||||
if data[i] == 0x10 && data[i + 1] == 0x03 {
|
||||
return Some(i);
|
||||
}
|
||||
}
|
||||
None
|
||||
|
||||
(2..data.len() - 1)
|
||||
.find(|&i| data[i] == 0x10 && data[i + 1] == 0x03)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user