Lint debug prints and disallowed types with clippy

This commit is contained in:
Lukas Wirth 2024-02-01 16:16:38 +01:00
parent 850ba2fb63
commit 9e8a0fae0c
64 changed files with 170 additions and 229 deletions

View file

@ -54,12 +54,13 @@ use core::any::{Any, TypeId};
use core::hash::BuildHasherDefault;
use core::marker::PhantomData;
use ::std::collections::hash_map::{self, HashMap};
use ::std::collections::hash_map;
/// Raw access to the underlying `HashMap`.
///
/// This alias is provided for convenience because of the ugly third generic parameter.
pub type RawMap<A> = HashMap<TypeId, Box<A>, BuildHasherDefault<TypeIdHasher>>;
#[allow(clippy::disallowed_types)] // Uses a custom hasher
pub type RawMap<A> = hash_map::HashMap<TypeId, Box<A>, BuildHasherDefault<TypeIdHasher>>;
/// A collection containing zero or one values for any given type and allowing convenient,
/// type-safe access to those values.