Skip to content

Commit

Permalink
fix: clippy 1.79 lints
Browse files Browse the repository at this point in the history
  • Loading branch information
vilgotf committed Jun 15, 2024
1 parent 6fbcd26 commit 71b8bc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions twilight-http-ratelimiting/src/in_memory/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ impl Bucket {
/// Create a new bucket for the specified [`Path`].
pub fn new(path: Path) -> Self {
Self {
limit: AtomicU64::new(u64::max_value()),
limit: AtomicU64::new(u64::MAX),
path,
queue: BucketQueue::default(),
remaining: AtomicU64::new(u64::max_value()),
reset_after: AtomicU64::new(u64::max_value()),
remaining: AtomicU64::new(u64::MAX),
reset_after: AtomicU64::new(u64::MAX),
started_at: Mutex::new(None),
}
}
Expand Down Expand Up @@ -134,7 +134,7 @@ impl Bucket {
}

if let Some((limit, remaining, reset_after)) = ratelimits {
if bucket_limit != limit && bucket_limit == u64::max_value() {
if bucket_limit != limit && bucket_limit == u64::MAX {
self.reset_after.store(reset_after, Ordering::SeqCst);
self.limit.store(limit, Ordering::SeqCst);
}
Expand Down

0 comments on commit 71b8bc0

Please sign in to comment.