Less once_cell more std

This commit is contained in:
Lukas Wirth 2023-09-01 17:30:59 +02:00
parent 62268e474e
commit c09f175d59
7 changed files with 14 additions and 15 deletions

View file

@ -6,11 +6,11 @@ use std::{
fmt::{self, Debug, Display},
hash::{BuildHasherDefault, Hash, Hasher},
ops::Deref,
sync::OnceLock,
};
use dashmap::{DashMap, SharedValue};
use hashbrown::{hash_map::RawEntryMut, HashMap};
use once_cell::sync::OnceCell;
use rustc_hash::FxHasher;
use triomphe::Arc;
@ -177,12 +177,12 @@ impl<T: Display + Internable + ?Sized> Display for Interned<T> {
}
pub struct InternStorage<T: ?Sized> {
map: OnceCell<InternMap<T>>,
map: OnceLock<InternMap<T>>,
}
impl<T: ?Sized> InternStorage<T> {
pub const fn new() -> Self {
Self { map: OnceCell::new() }
Self { map: OnceLock::new() }
}
}