We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
NULL_DEVICE
const
1 parent c659225 commit 4c835c3Copy full SHA for 4c835c3
src/test_utils/null_device.rs
@@ -3,7 +3,7 @@ use sha2::{Digest, Sha256};
3
use std::{cell::OnceCell, process::Stdio, sync::OnceLock};
4
5
thread_local! {
6
- static NULL_DEVICE: OnceCell<NullPrinterDevice> = OnceCell::new();
+ static NULL_DEVICE: OnceCell<NullPrinterDevice> = const { OnceCell::new() };
7
}
8
static DEVICE_ID_COUNTER: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
9
static PORT_AND_DRIVER_INSTALLER: OnceLock<()> = OnceLock::new();
0 commit comments