mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
Fix new clippy warnings
This commit is contained in:
parent
f661f854a4
commit
971afea727
2 changed files with 4 additions and 2 deletions
|
@ -134,7 +134,7 @@ impl<'a> TileRenderer<'a> {
|
||||||
/// Hashing the value as a single u32 is more efficient than hashing
|
/// Hashing the value as a single u32 is more efficient than hashing
|
||||||
/// the tuple elements separately.
|
/// the tuple elements separately.
|
||||||
fn biome_key((dx, dz, index): (i8, i8, u16)) -> u32 {
|
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
|
/// One quadrant of the kernel used to smooth biome edges
|
||||||
|
|
|
@ -39,7 +39,9 @@ pub fn to_flat_coord<const AXIS: u8>(
|
||||||
chunk: ChunkCoord<AXIS>,
|
chunk: ChunkCoord<AXIS>,
|
||||||
block: BlockCoord<AXIS>,
|
block: BlockCoord<AXIS>,
|
||||||
) -> i32 {
|
) -> 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
|
/// Splits a flat (linear) coordinate into region, chunk and block numbers
|
||||||
|
|
Loading…
Add table
Reference in a new issue