Skip to content

Commit

Permalink
style: satisfy clippy new warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
loyd committed Apr 5, 2024
1 parent 6f06511 commit 3ec1de0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion elfo-core/src/coop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const MAX_TIME_NS: u64 = 5_000_000; // 5ms
const MAX_COUNT: u32 = 64;

thread_local! {
static BUDGET: Cell<Budget> = Cell::new(Budget::ByCount(0));
static BUDGET: Cell<Budget> = const { Cell::new(Budget::ByCount(0)) };
}

#[derive(Debug, Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion elfo-core/src/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ pub fn try_meta() -> Option<Arc<ActorMeta>> {
}

thread_local! {
static SERDE_MODE: Cell<SerdeMode> = Cell::new(SerdeMode::Normal);
static SERDE_MODE: Cell<SerdeMode> = const { Cell::new(SerdeMode::Normal) };
}

/// A mode of (de)serialization.
Expand Down
2 changes: 1 addition & 1 deletion elfo-macros-impl/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use proc_macro2::TokenStream;
use syn::Error;

thread_local! {
static ERROR: RefCell<Option<Error>> = RefCell::new(None);
static ERROR: RefCell<Option<Error>> = const { RefCell::new(None) };
}

macro_rules! emit_error {
Expand Down

0 comments on commit 3ec1de0

Please sign in to comment.