diff options
| author | mat <git@matdoes.dev> | 2025-06-11 16:55:33 +1100 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-11 16:55:33 +1100 |
| commit | 9b0bd29db4faa9d94df0cec472346b814e7efcb9 (patch) | |
| tree | 4f681b5143eb5ebe69a0b5b53125ea7509f8026a /azalea-world/src/find_blocks.rs | |
| parent | 2a6ac0764fe9975f9b16d495ce773e4ae1f097e0 (diff) | |
| download | azalea-drasl-9b0bd29db4faa9d94df0cec472346b814e7efcb9.tar.xz | |
take BlockPos instead of &BlockPos in all function arguments
Diffstat (limited to 'azalea-world/src/find_blocks.rs')
| -rw-r--r-- | azalea-world/src/find_blocks.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/azalea-world/src/find_blocks.rs b/azalea-world/src/find_blocks.rs index 10068243..4086358f 100644 --- a/azalea-world/src/find_blocks.rs +++ b/azalea-world/src/find_blocks.rs @@ -7,7 +7,7 @@ impl Instance { /// Find the coordinates of a block in the world. /// /// Note that this is sorted by `x+y+z` and not `x^2+y^2+z^2` for - /// optimization purposes. + /// performance purposes. /// /// ``` /// # fn example(client: &azalea_client::Client) { @@ -93,7 +93,7 @@ impl Instance { /// are in the given block states. /// /// Note that this is sorted by `x+y+z` and not `x^2+y^2+z^2` for - /// optimization purposes. + /// performance purposes. pub fn find_blocks<'a>( &'a self, nearest_to: impl Into<BlockPos>, @@ -274,8 +274,8 @@ mod tests { chunk_storage, ); - chunk_storage.set_block_state(&BlockPos { x: 17, y: 0, z: 0 }, Block::Stone.into()); - chunk_storage.set_block_state(&BlockPos { x: 0, y: 18, z: 0 }, Block::Stone.into()); + chunk_storage.set_block_state(BlockPos { x: 17, y: 0, z: 0 }, Block::Stone.into()); + chunk_storage.set_block_state(BlockPos { x: 0, y: 18, z: 0 }, Block::Stone.into()); let pos = instance.find_block(BlockPos { x: 0, y: 0, z: 0 }, &Block::Stone.into()); assert_eq!(pos, Some(BlockPos { x: 17, y: 0, z: 0 })); @@ -301,8 +301,8 @@ mod tests { chunk_storage, ); - chunk_storage.set_block_state(&BlockPos { x: -1, y: 0, z: 0 }, Block::Stone.into()); - chunk_storage.set_block_state(&BlockPos { x: 15, y: 0, z: 0 }, Block::Stone.into()); + chunk_storage.set_block_state(BlockPos { x: -1, y: 0, z: 0 }, Block::Stone.into()); + chunk_storage.set_block_state(BlockPos { x: 15, y: 0, z: 0 }, Block::Stone.into()); let pos = instance.find_block(BlockPos { x: 0, y: 0, z: 0 }, &Block::Stone.into()); assert_eq!(pos, Some(BlockPos { x: -1, y: 0, z: 0 })); |
