Skip to content

Commit d4b2d5e

Browse files
committed
Const-initialize ID
1 parent f199246 commit d4b2d5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ thread_local! {
1414
/// The global ID counter for tracked values. Each tracked value gets a
1515
/// unqiue ID based on which its validations are cached in the accelerator.
1616
/// IDs may only be reused upon eviction of the accelerator.
17-
static ID: Cell<usize> = Cell::new(0);
17+
static ID: Cell<usize> = const { Cell::new(0) };
1818

1919
/// The global, dynamic accelerator shared by all cached values.
2020
static ACCELERATOR: RefCell<HashMap<(usize, u128), u128>>

0 commit comments

Comments
 (0)