diff options
| author | mat <git@matdoes.dev> | 2025-12-15 11:14:40 +0930 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-15 11:14:40 +0930 |
| commit | dcbd690f21665e22ea250024a1aa85dec34e6c9e (patch) | |
| tree | 411c76eb92ca1cfe284e56f47bc0abd4079a3364 /azalea-auth/src | |
| parent | b0a2a809331b0f781517649857d31e0aec67d300 (diff) | |
| download | azalea-drasl-dcbd690f21665e22ea250024a1aa85dec34e6c9e.tar.xz | |
sort derives with cargo sort-derives
might add to ci later, unsure how to do it without adding significant friction for contributors though
Diffstat (limited to 'azalea-auth/src')
| -rw-r--r-- | azalea-auth/src/auth.rs | 6 | ||||
| -rw-r--r-- | azalea-auth/src/cache.rs | 4 | ||||
| -rw-r--r-- | azalea-auth/src/game_profile.rs | 12 |
3 files changed, 11 insertions, 11 deletions
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<T> { /// 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<SerializableGameProfile> 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<String, ProfilePropertyValue>, } @@ -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<String>, @@ -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<GameProfile> for SerializableGameProfile { } } -#[derive(Debug, Clone, Serialize, Deserialize, Default)] +#[derive(Clone, Debug, Default, Deserialize, Serialize)] #[serde(transparent)] pub struct SerializableProfileProperties { pub list: Vec<SerializableProfilePropertyValue>, @@ -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, |
