1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-20 11:47:46 +00:00

Some code cleanup in texture

This commit is contained in:
Joshua Goins 2024-04-18 22:07:57 -04:00
parent 99f79ddb6b
commit b9110b58ec

View file

@ -3,7 +3,6 @@
#![allow(clippy::needless_range_loop)] #![allow(clippy::needless_range_loop)]
use std::cmp::min;
use std::io::{Cursor, Read, Seek, SeekFrom}; use std::io::{Cursor, Read, Seek, SeekFrom};
use binrw::BinRead; use binrw::BinRead;
@ -89,7 +88,7 @@ impl Texture {
.seek(SeekFrom::Start(std::mem::size_of::<TexHeader>() as u64)) .seek(SeekFrom::Start(std::mem::size_of::<TexHeader>() as u64))
.ok()?; .ok()?;
let mut src = vec![0u8; buffer.len() - std::mem::size_of::<TexHeader>() as usize]; let mut src = vec![0u8; buffer.len() - std::mem::size_of::<TexHeader>()];
cursor.read_exact(src.as_mut_slice()).ok()?; cursor.read_exact(src.as_mut_slice()).ok()?;
let mut dst; let mut dst;