misc: remove once_cell; superseded by std::*

We now have types in the Rust standard library.
Dropping the dependency.

I found this by using the `clippy::pedantic` group.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
Philipp Schuster
2025-06-20 11:49:39 +02:00
committed by Rob Bradford
parent 100c6d8142
commit 4182ef91e0
16 changed files with 16 additions and 35 deletions

4
fuzz/Cargo.lock generated
View File

@@ -217,7 +217,6 @@ dependencies = [
"micro_http",
"mshv-bindings",
"net_util",
"once_cell",
"seccompiler",
"virtio-devices",
"virtio-queue",
@@ -362,7 +361,6 @@ version = "0.1.0"
dependencies = [
"flume",
"libc",
"once_cell",
"serde",
"serde_json",
]
@@ -1089,7 +1087,6 @@ version = "0.1.0"
dependencies = [
"libc",
"log",
"once_cell",
"serde",
"serde_json",
]
@@ -1316,7 +1313,6 @@ dependencies = [
"log",
"micro_http",
"net_util",
"once_cell",
"option_parser",
"pci",
"rate_limiter",

View File

@@ -26,7 +26,6 @@ linux-loader = { version = "0.13.0", features = ["bzimage", "elf", "pe"] }
micro_http = { git = "https://github.com/firecracker-microvm/micro-http", branch = "main" }
mshv-bindings = "0.5.0"
net_util = { path = "../net_util" }
once_cell = "1.19.0"
seccompiler = "0.5.0"
virtio-devices = { path = "../virtio-devices" }
virtio-queue = "0.14.0"

View File

@@ -6,11 +6,11 @@
use std::os::unix::io::AsRawFd;
use std::path::PathBuf;
use std::sync::mpsc::{channel, Receiver};
use std::sync::LazyLock;
use std::thread;
use libfuzzer_sys::{fuzz_target, Corpus};
use micro_http::Request;
use once_cell::sync::Lazy;
use vm_migration::MigratableError;
use vmm::api::http::*;
use vmm::api::{
@@ -24,8 +24,8 @@ use vmm::{EpollContext, EpollDispatch};
use vmm_sys_util::eventfd::EventFd;
// Need to be ordered for test case reproducibility
static ROUTES: Lazy<Vec<&Box<dyn EndpointHandler + Sync + Send>>> =
Lazy::new(|| HTTP_ROUTES.routes.values().collect());
static ROUTES: LazyLock<Vec<&Box<dyn EndpointHandler + Sync + Send>>> =
LazyLock::new(|| HTTP_ROUTES.routes.values().collect());
fuzz_target!(|bytes: &[u8]| -> Corpus {
if bytes.len() < 2 {