prefer default over new

This commit is contained in:
BenjaminBrienen 2025-04-04 15:49:50 +02:00
parent 6ca780700d
commit 2462624a7d
46 changed files with 100 additions and 127 deletions

View file

@ -177,7 +177,10 @@ pub struct InternStorage<T: ?Sized> {
map: OnceLock<InternMap<T>>,
}
#[allow(clippy::new_without_default)] // this a const fn, so it can't be default
#[allow(
clippy::new_without_default,
reason = "this a const fn, so it can't be default yet. See <https://github.com/rust-lang/rust/issues/63065>"
)]
impl<T: ?Sized> InternStorage<T> {
pub const fn new() -> Self {
Self { map: OnceLock::new() }