Skip to content

Commit 10ea54a

Browse files
committed
Add comment about usage of fixed_pool_with_overflow instead of fixed_node_pool
1 parent 6183334 commit 10ea54a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/fixed_map/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,22 @@ pub type DefaultFixedList<K, V, const NODE_COUNT: usize, C> =
2020
FixedMap<K, V, NODE_COUNT, DefaultAllocator, C>;
2121

2222
#[repr(C)]
23-
#[allow(private_bounds)]
2423
pub struct FixedMap<
2524
K: Eq,
2625
V,
2726
const NODE_COUNT: usize,
2827
OverflowAllocator: Allocator,
2928
C: Compare<K> = Less<K>,
3029
> {
30+
// real EASTL uses a fixed_node_pool here, which is just fixed_pool_with_overflow templated
31+
// by node size instead of type, so it does not matter and we use fixed_pool_with_overflow
32+
// directly
3133
base_map: Map<K, V, FixedPoolWithOverflow<Node<K, V>, OverflowAllocator>, C>,
3234
// this should `technically` be conformant - `buffer` should be aligned to the alignment of
3335
// `ListNode<T>`...
3436
buffer: [MaybeUninit<Node<K, V>>; NODE_COUNT],
3537
}
3638

37-
#[allow(private_bounds)]
3839
impl<K: Eq, V, const NODE_COUNT: usize, OverflowAllocator: Allocator, C: Compare<K> + Default>
3940
FixedMap<K, V, NODE_COUNT, OverflowAllocator, C>
4041
{

0 commit comments

Comments
 (0)