make the function a bit faster in release mode

This commit is contained in:
endernon 2024-12-15 16:59:28 +00:00
parent 98794a6dfc
commit d00ac3056b

View file

@ -38,7 +38,7 @@ impl Chunk {
} }
pub fn fix(mut bytes: Vec<u8>) -> Vec<u8> { pub fn fix(mut bytes: Vec<u8>) -> Vec<u8> {
let mut bufread = Cursor::new(bytes.clone()); let mut bufread = Cursor::new(bytes);
// read the png header // read the png header
let mut header = [0; 8]; let mut header = [0; 8];