aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src/lib.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-19 22:01:54 -0500
committermat <github@matdoes.dev>2022-06-19 22:01:54 -0500
commitc9a070f711a6fdaf505f522cb8809749c9190e38 (patch)
treec64f5d6aaa4f489538d2e81814b31b5abca71a9e /azalea-world/src/lib.rs
parentd674633e856f0ac1683172ad5655ff7026c6eae6 (diff)
downloadazalea-drasl-c9a070f711a6fdaf505f522cb8809749c9190e38.tar.xz
Fix some clippy warnings
Diffstat (limited to 'azalea-world/src/lib.rs')
-rw-r--r--azalea-world/src/lib.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/azalea-world/src/lib.rs b/azalea-world/src/lib.rs
index 746143c7..dc538618 100644
--- a/azalea-world/src/lib.rs
+++ b/azalea-world/src/lib.rs
@@ -6,14 +6,13 @@ mod entity;
mod palette;
use azalea_block::BlockState;
-use azalea_core::{BlockPos, ChunkBlockPos, ChunkPos, ChunkSectionBlockPos, EntityPos};
+use azalea_core::{BlockPos, ChunkPos, EntityPos};
use azalea_entity::Entity;
-use azalea_protocol::mc_buf::{McBufReadable, McBufWritable};
pub use bit_storage::BitStorage;
pub use chunk::{Chunk, ChunkStorage};
pub use entity::EntityStorage;
use std::{
- io::{Read, Write},
+ io::Read,
ops::{Index, IndexMut},
sync::{Arc, Mutex},
};
@@ -61,7 +60,7 @@ impl World {
let entity = self
.entity_storage
.get_mut_by_id(entity_id)
- .ok_or("Moving entity that doesn't exist".to_string())?;
+ .ok_or_else(|| "Moving entity that doesn't exist".to_string())?;
let old_chunk = ChunkPos::from(entity.pos());
let new_chunk = ChunkPos::from(&new_pos);
// this is fine because we update the chunk below