Skip to content

Commit 0c528ef

Browse files
committed
Use cfg!
1 parent 681212f commit 0c528ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/raw/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ impl<T, A: Allocator + Clone> RawTable<T, A> {
10541054
/// `RawIterHash`. Because we cannot make the `next` method unsafe on the
10551055
/// `RawIterHash` struct, we have to make the `iter_hash` method unsafe.
10561056
#[cfg_attr(feature = "inline-more", inline)]
1057-
#[allow(dead_code)] // Used when the `raw` API is enabled
1057+
#[cfg(feature = "raw")]
10581058
pub unsafe fn iter_hash(&self, hash: u64) -> RawIterHash<'_, T, A> {
10591059
RawIterHash::new(self, hash)
10601060
}
@@ -2214,6 +2214,7 @@ struct RawIterHashInner<'a, A: Allocator + Clone> {
22142214

22152215
impl<'a, T, A: Allocator + Clone> RawIterHash<'a, T, A> {
22162216
#[cfg_attr(feature = "inline-more", inline)]
2217+
#[cfg(feature = "raw")]
22172218
fn new(table: &'a RawTable<T, A>, hash: u64) -> Self {
22182219
RawIterHash {
22192220
inner: RawIterHashInner::new(&table.table, hash),
@@ -2223,6 +2224,7 @@ impl<'a, T, A: Allocator + Clone> RawIterHash<'a, T, A> {
22232224
}
22242225
impl<'a, A: Allocator + Clone> RawIterHashInner<'a, A> {
22252226
#[cfg_attr(feature = "inline-more", inline)]
2227+
#[cfg(feature = "raw")]
22262228
fn new(table: &'a RawTableInner<A>, hash: u64) -> Self {
22272229
unsafe {
22282230
let h2_hash = h2(hash);

0 commit comments

Comments
 (0)