#![allow(unused_imports)]
#[cfg(not(feature = "std"))]
pub use alloc::{
borrow::ToOwned,
boxed::Box,
format,
string::{String, ToString},
vec,
vec::Vec,
};
#[cfg(feature = "std")]
pub use std::{
borrow::ToOwned,
boxed::Box,
format,
string::{String, ToString},
vec,
vec::Vec,
};
pub use hashbrown::HashMap;
#[cfg(not(feature = "std"))]
pub use spin::{Lazy, Mutex, Once, RwLock};
#[cfg(feature = "std")]
pub use std::sync::{Mutex, OnceLock, RwLock};
#[cfg(feature = "std")]
pub use std::sync::LazyLock as Lazy;
pub use core::sync::atomic::{AtomicU64, AtomicUsize, Ordering};
#[cfg(not(feature = "std"))]
pub type OnceLock<T> = spin::Once<T>;
#[cfg(not(feature = "std"))]
pub trait OnceLockExt<T> {
fn get_or_init<F>(&self, f: F) -> &T
where
F: FnOnce() -> T;
}
#[cfg(not(feature = "std"))]
impl<T> OnceLockExt<T> for spin::Once<T> {
fn get_or_init<F>(&self, f: F) -> &T
where
F: FnOnce() -> T,
{
self.call_once(f)
}
}
pub use core::f64::consts::PI;