Skip to content

Commit f46bff4

Browse files
committed
default A=Global for raw types
1 parent a586f25 commit f46bff4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/raw/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ impl<T> Bucket<T> {
367367
}
368368

369369
/// A raw hash table with an unsafe API.
370-
pub struct RawTable<T, A: Allocator + Clone> {
370+
pub struct RawTable<T, A: Allocator + Clone = Global> {
371371
// Mask to get an index from a hash value. The value is one less than the
372372
// number of buckets in the table.
373373
bucket_mask: usize,
@@ -1770,7 +1770,7 @@ impl<T> ExactSizeIterator for RawIter<T> {}
17701770
impl<T> FusedIterator for RawIter<T> {}
17711771

17721772
/// Iterator which consumes a table and returns elements.
1773-
pub struct RawIntoIter<T, A: Allocator + Clone> {
1773+
pub struct RawIntoIter<T, A: Allocator + Clone = Global> {
17741774
iter: RawIter<T>,
17751775
allocation: Option<(NonNull<u8>, Layout)>,
17761776
marker: PhantomData<T>,
@@ -1845,7 +1845,7 @@ impl<T, A: Allocator + Clone> ExactSizeIterator for RawIntoIter<T, A> {}
18451845
impl<T, A: Allocator + Clone> FusedIterator for RawIntoIter<T, A> {}
18461846

18471847
/// Iterator which consumes elements without freeing the table storage.
1848-
pub struct RawDrain<'a, T, A: Allocator + Clone> {
1848+
pub struct RawDrain<'a, T, A: Allocator + Clone = Global> {
18491849
iter: RawIter<T>,
18501850

18511851
// The table is moved into the iterator for the duration of the drain. This
@@ -1915,7 +1915,7 @@ impl<T, A: Allocator + Clone> FusedIterator for RawDrain<'_, T, A> {}
19151915
/// Iterator over occupied buckets that could match a given hash.
19161916
///
19171917
/// In rare cases, the iterator may return a bucket with a different hash.
1918-
pub struct RawIterHash<'a, T, A: Allocator + Clone> {
1918+
pub struct RawIterHash<'a, T, A: Allocator + Clone = Global> {
19191919
table: &'a RawTable<T, A>,
19201920

19211921
// The top 7 bits of the hash.

0 commit comments

Comments
 (0)