Fix new clippy warnings

This commit is contained in:
Matthias Schiffer 2025-02-21 10:55:36 +01:00
parent f661f854a4
commit 971afea727
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
2 changed files with 4 additions and 2 deletions

View file

@ -134,7 +134,7 @@ impl<'a> TileRenderer<'a> {
/// Hashing the value as a single u32 is more efficient than hashing
/// the tuple elements separately.
fn biome_key((dx, dz, index): (i8, i8, u16)) -> u32 {
(dx as u8 as u32) | (dz as u8 as u32) << 8 | (index as u32) << 16
(dx as u8 as u32) | ((dz as u8 as u32) << 8) | ((index as u32) << 16)
}
/// One quadrant of the kernel used to smooth biome edges

View file

@ -39,7 +39,9 @@ pub fn to_flat_coord<const AXIS: u8>(
chunk: ChunkCoord<AXIS>,
block: BlockCoord<AXIS>,
) -> i32 {
(region as i32) << (BLOCK_BITS + CHUNK_BITS) | ((chunk.0 as i32) << BLOCK_BITS | block.0 as i32)
((region as i32) << (BLOCK_BITS + CHUNK_BITS))
| ((chunk.0 as i32) << BLOCK_BITS)
| (block.0 as i32)
}
/// Splits a flat (linear) coordinate into region, chunk and block numbers