aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-world/src')
-rwxr-xr-xazalea-world/src/chunk_storage.rs1
-rwxr-xr-xazalea-world/src/palette.rs2
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());