mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Implement debug
This commit is contained in:
parent
e9f6120b4c
commit
f34f42ab4c
|
@ -21,6 +21,7 @@ use alloc::alloc::Global;
|
|||
use core::{
|
||||
alloc::Allocator,
|
||||
borrow::Borrow,
|
||||
fmt::Debug,
|
||||
hash::{BuildHasher, BuildHasherDefault, Hash, Hasher},
|
||||
iter::FromIterator,
|
||||
ops::Index,
|
||||
|
@ -809,6 +810,16 @@ where
|
|||
{
|
||||
}
|
||||
|
||||
impl<K, V, ALLOCATOR: ClonableAllocator> Debug for HashMap<K, V, ALLOCATOR>
|
||||
where
|
||||
K: Debug,
|
||||
V: Debug,
|
||||
{
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
f.debug_map().entries(self.iter()).finish()
|
||||
}
|
||||
}
|
||||
|
||||
const fn number_before_resize(capacity: usize) -> usize {
|
||||
capacity * 85 / 100
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue