mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
committed by
Rob Bradford
parent
100c6d8142
commit
4182ef91e0
@@ -11,13 +11,13 @@ use std::os::unix::net::UnixListener;
|
||||
use std::panic::AssertUnwindSafe;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::sync::LazyLock;
|
||||
use std::thread;
|
||||
|
||||
use hypervisor::HypervisorType;
|
||||
use micro_http::{
|
||||
Body, HttpServer, MediaType, Method, Request, Response, ServerError, StatusCode, Version,
|
||||
};
|
||||
use once_cell::sync::Lazy;
|
||||
use seccompiler::{apply_filter, SeccompAction};
|
||||
use serde_json::Error as SerdeError;
|
||||
use thiserror::Error;
|
||||
@@ -173,7 +173,7 @@ macro_rules! endpoint {
|
||||
}
|
||||
|
||||
/// HTTP_ROUTES contain all the cloud-hypervisor HTTP routes.
|
||||
pub static HTTP_ROUTES: Lazy<HttpRoutes> = Lazy::new(|| {
|
||||
pub static HTTP_ROUTES: LazyLock<HttpRoutes> = LazyLock::new(|| {
|
||||
let mut r = HttpRoutes {
|
||||
routes: BTreeMap::new(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user