Use optimized copy
This commit is contained in:
parent
3163a92594
commit
04010978a0
1 changed files with 1 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ impl PngData {
|
||||||
let mut idat_headers: Vec<u8> = Vec::new();
|
let mut idat_headers: Vec<u8> = Vec::new();
|
||||||
while let Some(header) = parse_next_header(byte_data, &mut byte_offset, fix_errors)? {
|
while let Some(header) = parse_next_header(byte_data, &mut byte_offset, fix_errors)? {
|
||||||
match &header.name {
|
match &header.name {
|
||||||
b"IDAT" => idat_headers.extend(header.data),
|
b"IDAT" => idat_headers.extend_from_slice(header.data),
|
||||||
b"acTL" => return Err(PngError::APNGNotSupported),
|
b"acTL" => return Err(PngError::APNGNotSupported),
|
||||||
_ => {
|
_ => {
|
||||||
aux_headers.insert(header.name, header.data.to_owned());
|
aux_headers.insert(header.name, header.data.to_owned());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue