Skip to content

Commit 7ab9a5b

Browse files
committed
fix(callback): use serde rename to keep deserialization working and silence unused field warnings
1 parent 2628a9f commit 7ab9a5b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

rustmail/src/api/handler/auth/callback.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ pub struct AuthRequest {
1717
#[derive(serde::Deserialize, Debug)]
1818
struct DiscordUser {
1919
id: String,
20+
#[serde(rename = "username")]
2021
_username: String,
22+
#[serde(rename = "discriminator")]
2123
_discriminator: String,
2224
avatar: Option<String>,
2325
}

0 commit comments

Comments
 (0)