Skip to content

Commit da0ac65

Browse files
EliseChouleurclaude
andcommitted
Fix clippy warning: use const initializer for thread_local
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ceabbfc commit da0ac65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cryptoki/examples/thread_local_session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static PKCS11_CTX: Mutex<Option<Pkcs11>> = Mutex::new(None);
5454
// Session is Send but NOT Sync: it can be moved between threads
5555
// but cannot be shared. Each thread must have its own Session instance.
5656
thread_local! {
57-
static PKCS11_SESSION: RefCell<Option<Session>> = RefCell::new(None);
57+
static PKCS11_SESSION: RefCell<Option<Session>> = const { RefCell::new(None) };
5858
}
5959

6060
/// Initialize the global PKCS11 context once.

0 commit comments

Comments
 (0)