1
0
Fork 0
forked from wry/wry

all: address clippy issues

This commit is contained in:
Julian Orth 2023-02-04 14:20:10 +01:00
parent 9c7299234a
commit 036af4abaa
10 changed files with 23 additions and 13 deletions

View file

@ -613,8 +613,8 @@ fn parser_cursor_file<R: BufRead + Seek>(
};
let num_bytes = width as usize * height as usize * 4;
unsafe {
image.pixels.reserve_exact(num_bytes as usize);
image.pixels.set_len(num_bytes as usize);
image.pixels.reserve_exact(num_bytes);
image.pixels.set_len(num_bytes);
r.read_exact(slice::from_raw_parts_mut(
image.pixels.as_mut_ptr() as _,
num_bytes,