aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--azalea-world/src/iterators.rs2
-rw-r--r--azalea-world/src/world.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/azalea-world/src/iterators.rs b/azalea-world/src/iterators.rs
index 53a94898..4054bfe0 100644
--- a/azalea-world/src/iterators.rs
+++ b/azalea-world/src/iterators.rs
@@ -73,7 +73,7 @@ impl Iterator for BlockIterator {
let x = self.pos.x * self.right;
let y = self.pos.y * ((self.apothem as i32) - self.left);
let z = self.pos.z * ((self.apothem as i32) - (i32::abs(x) + i32::abs(y)));
- Some(BlockPos { x: x, y, z } + self.start)
+ Some(BlockPos { x, y, z } + self.start)
}
}
diff --git a/azalea-world/src/world.rs b/azalea-world/src/world.rs
index 5bb9b0b7..7da9b869 100644
--- a/azalea-world/src/world.rs
+++ b/azalea-world/src/world.rs
@@ -242,7 +242,7 @@ impl Instance {
let this_block_pos = BlockPos { x, y, z };
let this_block_distance = (nearest_to - this_block_pos).length_manhattan();
// only update if it's closer
- if !nearest_found_pos.is_some()
+ if nearest_found_pos.is_none()
|| this_block_distance < nearest_found_distance
{
nearest_found_pos = Some(this_block_pos);