Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrasnitski committed Nov 19, 2024
1 parent 5de6e13 commit 6e22f74
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/model/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ impl fmt::Display for Minimum {
/// [`GuildId::ban`] method, which in this example is used to re-ban all members.
///
/// ```rust,no_run
/// # use serenity::http::Http;
/// use serenity::model::prelude::*;
/// use serenity::model::ModelError;
/// use serenity::prelude::*;
/// use serenity::Error;
///
/// # #[cfg(feature = "http")]
/// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
/// # let http: Http = unimplemented!();
/// # let http: serenity::http::Http = unimplemented!();
/// # let guild_id: GuildId = unimplemented!();
/// # let user: User = unimplemented!();
///
Expand Down
3 changes: 1 addition & 2 deletions src/model/guild/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -926,11 +926,10 @@ impl Guild {
/// ```rust,no_run
/// # use serenity::model::prelude::*;
/// # use serenity::prelude::*;
/// # use serenity::cache::Cache;
///
/// # #[cfg(feature = "cache")]
/// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
/// # let cache: Cache = unimplemented!();
/// # let cache: serenity::cache::Cache = unimplemented!();
/// # let msg: Message = unimplemented!();
///
/// if let Some(guild_id) = msg.guild_id {
Expand Down
3 changes: 1 addition & 2 deletions src/model/guild/partial_guild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,10 @@ impl PartialGuild {
/// ```rust,no_run
/// # use serenity::model::prelude::*;
/// # use serenity::prelude::*;
/// # use serenity::cache::Cache;
///
/// # #[cfg(feature = "cache")]
/// # async fn run() -> Result<(), Box<dyn std::error::Error>> {
/// # let cache: Cache = unimplemented!();
/// # let cache: serenity::cache::Cache = unimplemented!();
/// # let msg: Message = unimplemented!();
///
/// if let Some(guild_id) = msg.guild_id {
Expand Down
3 changes: 2 additions & 1 deletion src/secrets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ impl zeroize::Zeroize for SecretString {
}

#[cfg(feature = "typesize")]
impl typesize::TypeSize for Token {
impl typesize::TypeSize for SecretString {
fn extra_size(&self) -> usize {
self.0.len() + (size_of::<usize>() * 2)
}
}

/// A type for securely storing and passing around a Discord token.
#[cfg_attr(feature = "typesize", derive(typesize::derive::TypeSize))]
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Token(SecretString);

Expand Down

0 comments on commit 6e22f74

Please sign in to comment.