Skip to content

Commit da2cbaf

Browse files
author
Cole Miller
committed
Implement Default for RawTable
1 parent b5b5be8 commit da2cbaf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/raw/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,13 @@ impl<T: Clone, A: Allocator + Clone> RawTable<T, A> {
15871587
}
15881588
}
15891589

1590+
impl<T, A: Allocator + Clone + Default> Default for RawTable<T, A> {
1591+
#[cfg_attr(feature = "inline-more", inline)]
1592+
fn default() -> Self {
1593+
Self::new_in(Default::default())
1594+
}
1595+
}
1596+
15901597
#[cfg(feature = "nightly")]
15911598
unsafe impl<#[may_dangle] T, A: Allocator + Clone> Drop for RawTable<T, A> {
15921599
#[cfg_attr(feature = "inline-more", inline)]

0 commit comments

Comments
 (0)