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-auth/src/auth.rs | 6 +++--- azalea-auth/src/cache.rs | 4 ++-- azalea-auth/src/game_profile.rs | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'azalea-auth/src') diff --git a/azalea-auth/src/auth.rs b/azalea-auth/src/auth.rs index 779910d3..ef084d95 100644 --- a/azalea-auth/src/auth.rs +++ b/azalea-auth/src/auth.rs @@ -224,7 +224,7 @@ pub struct DeviceCodeResponse { pub interval: u64, } -#[derive(Debug, Deserialize, Serialize, Clone)] +#[derive(Clone, Debug, Deserialize, Serialize)] pub struct AccessTokenResponse { pub token_type: String, pub expires_in: u64, @@ -244,7 +244,7 @@ pub struct XboxLiveAuthResponse { } /// Just the important data -#[derive(Serialize, Deserialize, Debug)] +#[derive(Debug, Deserialize, Serialize)] pub struct XboxLiveAuth { pub token: String, pub user_hash: String, @@ -273,7 +273,7 @@ pub struct GameOwnershipItem { pub signature: String, } -#[derive(Debug, Clone, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize, Serialize)] pub struct ProfileResponse { pub id: Uuid, pub name: String, diff --git a/azalea-auth/src/cache.rs b/azalea-auth/src/cache.rs index da200053..62921773 100644 --- a/azalea-auth/src/cache.rs +++ b/azalea-auth/src/cache.rs @@ -26,7 +26,7 @@ pub enum CacheError { Parse(serde_json::Error), } -#[derive(Deserialize, Serialize, Debug)] +#[derive(Debug, Deserialize, Serialize)] pub struct CachedAccount { #[serde(alias = "email")] pub cache_key: String, @@ -40,7 +40,7 @@ pub struct CachedAccount { pub profile: crate::auth::ProfileResponse, } -#[derive(Deserialize, Serialize, Debug)] +#[derive(Debug, Deserialize, Serialize)] pub struct ExpiringValue { /// Seconds since the UNIX epoch pub expires_at: u64, diff --git a/azalea-auth/src/game_profile.rs b/azalea-auth/src/game_profile.rs index 9038ea61..99af322d 100644 --- a/azalea-auth/src/game_profile.rs +++ b/azalea-auth/src/game_profile.rs @@ -11,7 +11,7 @@ use serde::{Deserialize, Serialize, Serializer}; use uuid::Uuid; /// Information about the player that's usually stored on Mojang's servers. -#[derive(Debug, Clone, Default, Eq, PartialEq, AzBuf)] +#[derive(AzBuf, Clone, Debug, Default, Eq, PartialEq)] pub struct GameProfile { /// The UUID of the player. /// @@ -49,7 +49,7 @@ impl From for GameProfile { } /// The properties of the player, including their in-game skin and cape. -#[derive(Debug, Clone, Default, Eq, PartialEq)] +#[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct GameProfileProperties { pub map: IndexMap, } @@ -82,7 +82,7 @@ impl AzaleaWrite for GameProfileProperties { } } -#[derive(Debug, Clone, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] pub struct ProfilePropertyValue { pub value: String, pub signature: Option, @@ -102,7 +102,7 @@ impl AzaleaWrite for ProfilePropertyValue { } } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SerializableGameProfile { #[serde(default)] #[serde(skip_serializing_if = "Option::is_none")] @@ -125,7 +125,7 @@ impl From for SerializableGameProfile { } } -#[derive(Debug, Clone, Serialize, Deserialize, Default)] +#[derive(Clone, Debug, Default, Deserialize, Serialize)] #[serde(transparent)] pub struct SerializableProfileProperties { pub list: Vec, @@ -135,7 +135,7 @@ impl SerializableProfileProperties { self.list.is_empty() } } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Clone, Debug, Deserialize, Serialize)] pub struct SerializableProfilePropertyValue { pub name: String, pub value: String, -- cgit v1.2.3