From dcbd690f21665e22ea250024a1aa85dec34e6c9e Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 15 Dec 2025 11:14:40 +0930 Subject: sort derives with cargo sort-derives might add to ci later, unsure how to do it without adding significant friction for contributors though --- azalea/src/pathfinder/astar.rs | 2 +- azalea/src/pathfinder/debug.rs | 2 +- azalea/src/pathfinder/mod.rs | 6 +++--- azalea/src/pathfinder/rel_block_pos.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'azalea/src/pathfinder') diff --git a/azalea/src/pathfinder/astar.rs b/azalea/src/pathfinder/astar.rs index d2a57b38..ed776bec 100644 --- a/azalea/src/pathfinder/astar.rs +++ b/azalea/src/pathfinder/astar.rs @@ -310,7 +310,7 @@ impl PartialOrd for WeightedNode { /// /// [`PathfinderOpts::min_timeout`]: super::goto_event::PathfinderOpts::min_timeout /// [`PathfinderOpts::max_timeout`]: super::goto_event::PathfinderOpts::max_timeout -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq)] pub enum PathfinderTimeout { /// Time out after a certain duration has passed. /// diff --git a/azalea/src/pathfinder/debug.rs b/azalea/src/pathfinder/debug.rs index 4b241e5d..f8dc1193 100644 --- a/azalea/src/pathfinder/debug.rs +++ b/azalea/src/pathfinder/debug.rs @@ -15,7 +15,7 @@ use super::ExecutingPath; /// ``` /// # use azalea::prelude::*; /// # use azalea::pathfinder::debug::PathfinderDebugParticles; -/// # #[derive(Component, Clone, Default)] +/// # #[derive(Clone, Component, Default)] /// # pub struct State; /// /// async fn handle(mut bot: Client, event: azalea::Event, state: State) -> anyhow::Result<()> { diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index 81b2b845..90b506e9 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -121,7 +121,7 @@ impl Plugin for PathfinderPlugin { } /// A component that makes this client able to pathfind. -#[derive(Component, Default, Clone)] +#[derive(Clone, Component, Default)] #[non_exhaustive] pub struct Pathfinder { pub goal: Option>, @@ -132,7 +132,7 @@ pub struct Pathfinder { /// A component that's present on clients that are actively following a /// pathfinder path. -#[derive(Component, Clone)] +#[derive(Clone, Component)] pub struct ExecutingPath { pub path: VecDeque>, pub queued_path: Option>>, @@ -141,7 +141,7 @@ pub struct ExecutingPath { pub is_path_partial: bool, } -#[derive(Message, Clone, Debug)] +#[derive(Clone, Debug, Message)] #[non_exhaustive] pub struct PathFoundEvent { pub entity: Entity, diff --git a/azalea/src/pathfinder/rel_block_pos.rs b/azalea/src/pathfinder/rel_block_pos.rs index b5fd23dc..6b5fa69a 100644 --- a/azalea/src/pathfinder/rel_block_pos.rs +++ b/azalea/src/pathfinder/rel_block_pos.rs @@ -7,7 +7,7 @@ use azalea_core::position::BlockPos; /// This fits in 64 bits, so it's more efficient than a BlockPos in some cases. /// /// The X and Z are limited to ±32k. -#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] #[repr(C)] pub struct RelBlockPos { pub x: i16, -- cgit v1.2.3