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:
Wei Liu
2022-06-20 14:05:17 +00:00
committed by Liu Wei
parent 8fa1098629
commit 32b855df3a
5 changed files with 8 additions and 17 deletions

View File

@@ -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,