Skip to content

Commit

Permalink
Deserialise Token from Strings instead of &strs (serenity-rs#3104)
Browse files Browse the repository at this point in the history
  • Loading branch information
Freyja-moth authored Feb 4, 2025
1 parent ebbf0b6 commit 5272391
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/secrets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl typesize::TypeSize for SecretString {
/// A type for securely storing and passing around a Discord token.
#[cfg_attr(feature = "typesize", derive(typesize::derive::TypeSize))]
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(try_from = "&str")]
#[serde(try_from = "String")]
pub struct Token(SecretString);

impl Token {
Expand Down

0 comments on commit 5272391

Please # to comment.