mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: switch from lazy_static to once_cell
Once_cell does not require using macro and is slated to become part of Rust std at some point. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -8,10 +8,6 @@
|
||||
// related warnings for our quality workflow to pass.
|
||||
#![allow(dead_code)]
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
extern crate test_infra;
|
||||
|
||||
use net_util::MacAddr;
|
||||
@@ -6565,10 +6561,9 @@ mod sequential {
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
mod windows {
|
||||
use crate::*;
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
lazy_static! {
|
||||
static ref NEXT_DISK_ID: Mutex<u8> = Mutex::new(1);
|
||||
}
|
||||
static NEXT_DISK_ID: Lazy<Mutex<u8>> = Lazy::new(|| Mutex::new(1));
|
||||
|
||||
struct WindowsGuest {
|
||||
guest: Guest,
|
||||
|
||||
Reference in New Issue
Block a user