Skip to content

Commit

Permalink
fix(cache,ratelimiting): Resolved some warnings when building docs. (#…
Browse files Browse the repository at this point in the history
…2331)

The dead code warning is for some reason only picked up on nightly.
  • Loading branch information
Erk- authored Apr 5, 2024
1 parent 8f5cd0d commit 816571c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions twilight-cache-inmemory/src/permission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ use twilight_util::permission_calculator::PermissionCalculator;
/// Refer to the [module level] documentation for more information on how
/// disabled member communication is calculated.
///
/// [communication has been disabled]: crate::MemberInterface::communication_disabled_until
/// [communication has been disabled]: crate::model::CachedMember::communication_disabled_until
/// [module level]: crate::permission
pub const MEMBER_COMMUNICATION_DISABLED_ALLOWLIST: Permissions = Permissions::from_bits_truncate(
Permissions::READ_MESSAGE_HISTORY.bits() | Permissions::VIEW_CHANNEL.bits(),
Expand Down Expand Up @@ -334,7 +334,7 @@ impl<'a, CacheModels: CacheableModels> InMemoryCachePermissions<'a, CacheModels>
///
/// Defaults to being enabled.
///
/// [field]: crate::MemberInterface::communication_disabled_until
/// [field]: crate::model::CachedMember::communication_disabled_until
/// [module level]: crate::permission
pub const fn check_member_communication_disabled(
mut self,
Expand Down Expand Up @@ -394,7 +394,7 @@ impl<'a, CacheModels: CacheableModels> InMemoryCachePermissions<'a, CacheModels>
/// [`ResourceType::MEMBER`]: crate::ResourceType::MEMBER
/// [`ResourceType::ROLE`]: crate::ResourceType::ROLE
/// [`ResourceType`]: crate::ResourceType
/// [communication has been disabled]: crate::MemberInterface::communication_disabled_until
/// [communication has been disabled]: crate::model::CachedMember::communication_disabled_until
/// [module level]: crate::permission
/// [read-only permissions]: MEMBER_COMMUNICATION_DISABLED_ALLOWLIST
pub fn in_channel(
Expand Down Expand Up @@ -484,7 +484,7 @@ impl<'a, CacheModels: CacheableModels> InMemoryCachePermissions<'a, CacheModels>
/// [`ResourceType::MEMBER`]: crate::ResourceType::MEMBER
/// [`ResourceType::ROLE`]: crate::ResourceType::ROLE
/// [`ResourceType`]: crate::ResourceType
/// [communication has been disabled]: crate::MemberInterface::communication_disabled_until
/// [communication has been disabled]: crate::model::CachedMember::communication_disabled_until
/// [module level]: crate::permission
/// [read-only permissions]: MEMBER_COMMUNICATION_DISABLED_ALLOWLIST
pub fn root(
Expand Down
2 changes: 2 additions & 0 deletions twilight-http-ratelimiting/src/in_memory/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ pub struct Bucket {
/// Total number of tickets allotted in a cycle.
pub limit: AtomicU64,
/// Path this ratelimit applies to.
// This is dead code, but it is useful for debugging.
#[allow(dead_code)]
pub path: Path,
/// Queue associated with this bucket.
pub queue: BucketQueue,
Expand Down

0 comments on commit 816571c

Please sign in to comment.