diff options
| author | mat <git@matdoes.dev> | 2023-10-01 20:23:26 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-10-01 20:23:26 -0500 |
| commit | 4f6ab28325ce87678a406e07327bd4f051282109 (patch) | |
| tree | 1481029bb8a2a4bde50031c1c50ded3c9c216bf8 /azalea-world/src | |
| parent | 37146f46f03f2e18becb7b58725a9183bcbcb2e6 (diff) | |
| download | azalea-drasl-4f6ab28325ce87678a406e07327bd4f051282109.tar.xz | |
add pathfinder benchmark
Diffstat (limited to 'azalea-world/src')
| -rwxr-xr-x | azalea-world/src/chunk_storage.rs | 1 | ||||
| -rwxr-xr-x | azalea-world/src/palette.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index f7800d2b..2e93f2fb 100755 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -279,6 +279,7 @@ impl Chunk { get_block_state_from_sections(&self.sections, pos, min_y) } + #[must_use = "Use Chunk::set instead if you don't need the previous state"] pub fn get_and_set( &mut self, pos: &ChunkBlockPos, diff --git a/azalea-world/src/palette.rs b/azalea-world/src/palette.rs index 38cf5853..f1d6b1a3 100755 --- a/azalea-world/src/palette.rs +++ b/azalea-world/src/palette.rs @@ -172,7 +172,7 @@ impl PalettedContainer { } } Palette::Linear(palette) => { - if let Some(index) = palette.iter().position(|v| *v == value) { + if let Some(index) = palette.iter().position(|&v| v == value) { return index; } let capacity = 2usize.pow(self.bits_per_entry.into()); |
