Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan-rsm-McKenzie committed Mar 18, 2024
1 parent b16fdd9 commit 02be725
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/fo4/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use directxtex::{
};
use std::{error, io::Write};

#[allow(clippy::unnecessary_cast)]
const TEX_MISC_TEXTURECUBE: u32 = TEX_MISC_FLAG::TEX_MISC_TEXTURECUBE.bits() as u32;

/// File is at chunk capacity.
Expand Down Expand Up @@ -568,13 +569,12 @@ impl GNMF {
// https://learn.microsoft.com/en-us/windows/win32/direct3d11/texture-block-compression-in-direct3d-11
match self.surface_format() {
SurfaceFormat::FORMAT_8_8_8_8 => Ok(4),
SurfaceFormat::BC1 => Ok(8),
SurfaceFormat::BC2 => Ok(16),
SurfaceFormat::BC3 => Ok(16),
SurfaceFormat::BC4 => Ok(8),
SurfaceFormat::BC5 => Ok(16),
SurfaceFormat::BC6 => Ok(16),
SurfaceFormat::BC7 => Ok(16),
SurfaceFormat::BC1 | SurfaceFormat::BC4 => Ok(8),
SurfaceFormat::BC2
| SurfaceFormat::BC3
| SurfaceFormat::BC5
| SurfaceFormat::BC6
| SurfaceFormat::BC7 => Ok(16),
_ => Err(Error::NotImplemented),
}
}
Expand Down

0 comments on commit 02be725

Please sign in to comment.