diff options
Diffstat (limited to 'azalea/src/pathfinder')
| -rw-r--r-- | azalea/src/pathfinder/astar.rs | 4 | ||||
| -rw-r--r-- | azalea/src/pathfinder/mod.rs | 3 | ||||
| -rw-r--r-- | azalea/src/pathfinder/moves/mod.rs | 7 |
3 files changed, 9 insertions, 5 deletions
diff --git a/azalea/src/pathfinder/astar.rs b/azalea/src/pathfinder/astar.rs index feddb57b..e33001e7 100644 --- a/azalea/src/pathfinder/astar.rs +++ b/azalea/src/pathfinder/astar.rs @@ -1,7 +1,7 @@ use std::{ cmp::{self}, collections::BinaryHeap, - fmt::Debug, + fmt::{self, Debug}, hash::{BuildHasherDefault, Hash}, time::{Duration, Instant}, }; @@ -251,7 +251,7 @@ pub struct Movement<P: Hash + Copy, M> { } impl<P: Hash + Copy + Debug, M: Debug> Debug for Movement<P, M> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Movement") .field("target", &self.target) .field("data", &self.data) diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index afb1cc4d..58c3736c 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -1189,6 +1189,7 @@ mod tests { use std::{ collections::HashSet, sync::Arc, + thread, time::{Duration, Instant}, }; @@ -1270,7 +1271,7 @@ mod tests { && start_time.elapsed() < Duration::from_millis(500) { simulation.tick(); - std::thread::yield_now(); + thread::yield_now(); } } diff --git a/azalea/src/pathfinder/moves/mod.rs b/azalea/src/pathfinder/moves/mod.rs index 24dc8ac1..88bae957 100644 --- a/azalea/src/pathfinder/moves/mod.rs +++ b/azalea/src/pathfinder/moves/mod.rs @@ -1,7 +1,10 @@ pub mod basic; pub mod parkour; -use std::{fmt::Debug, sync::Arc}; +use std::{ + fmt::{self, Debug}, + sync::Arc, +}; use azalea_block::BlockState; use azalea_client::{ @@ -40,7 +43,7 @@ pub struct MoveData { pub is_reached: &'static (dyn Fn(IsReachedCtx) -> bool + Send + Sync), } impl Debug for MoveData { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("MoveData") // .field("move_kind", &self.move_kind) .finish() |
