cargo fmt --all
This commit is contained in:
parent
72fde539cd
commit
c4f91c2895
1 changed files with 4 additions and 3 deletions
|
@ -233,13 +233,14 @@ pub(crate) fn find_content<'a>(
|
||||||
let file_name_length = reader.read_u16::<LittleEndian>()? as u64;
|
let file_name_length = reader.read_u16::<LittleEndian>()? as u64;
|
||||||
let extra_field_length = reader.read_u16::<LittleEndian>()? as u64;
|
let extra_field_length = reader.read_u16::<LittleEndian>()? as u64;
|
||||||
let magic_and_header = 4 + 22 + 2 + 2;
|
let magic_and_header = 4 + 22 + 2 + 2;
|
||||||
let data_start = data.header_start + magic_and_header + file_name_length + extra_field_length;
|
let data_start =
|
||||||
|
data.header_start + magic_and_header + file_name_length + extra_field_length;
|
||||||
data.data_start.get_or_init(|| data_start);
|
data.data_start.get_or_init(|| data_start);
|
||||||
data_start
|
data_start
|
||||||
}
|
}
|
||||||
Some(start) => *start
|
Some(start) => *start,
|
||||||
};
|
};
|
||||||
|
|
||||||
reader.seek(io::SeekFrom::Start(data_start))?;
|
reader.seek(io::SeekFrom::Start(data_start))?;
|
||||||
Ok((reader as &mut dyn Read).take(data.compressed_size))
|
Ok((reader as &mut dyn Read).take(data.compressed_size))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue