Skip to content

Commit

Permalink
pacify the merciless clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Apr 2, 2024
1 parent e81b223 commit afd9b72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/lru.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ trait LruPeek {
struct HotPotato(u32);

thread_local! {
static N_POTATOES: AtomicUsize = AtomicUsize::new(0)
static N_POTATOES: AtomicUsize = const { AtomicUsize::new(0) }
}

impl HotPotato {
Expand Down
9 changes: 2 additions & 7 deletions tests/parallel/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,13 @@ impl<T> WithValue<T> for Cell<T> {
}
}

#[derive(Clone, Copy, PartialEq, Eq)]
#[derive(Clone, Copy, PartialEq, Eq, Default)]
pub(crate) enum CancellationFlag {
#[default]
Down,
Panic,
}

impl Default for CancellationFlag {
fn default() -> CancellationFlag {
CancellationFlag::Down
}
}

/// Various "knobs" that can be used to customize how the queries
/// behave on one specific thread. Note that this state is
/// intentionally thread-local (apart from `signal`).
Expand Down

0 comments on commit afd9b72

Please sign in to comment.