Skip to content

Commit a96b8df

Browse files
committed
fix clippy errors
1 parent 746f06e commit a96b8df

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl<K, V, A: AllocRef + Clone> HashMap<K, V, DefaultHashBuilder, A> {
246246
/// is first inserted into.
247247
#[cfg_attr(feature = "inline-more", inline)]
248248
pub fn new_in(alloc: A) -> Self {
249-
Self::with_hasher_in(Default::default(), alloc)
249+
Self::with_hasher_in(DefaultHashBuilder::default(), alloc)
250250
}
251251

252252
/// Creates an empty `HashMap` with the specified capacity using the given allocator.

src/raw/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,18 @@ impl Fallibility {
7676
/// Error to return on capacity overflow.
7777
#[cfg_attr(feature = "inline-more", inline)]
7878
fn capacity_overflow(self) -> CollectionAllocErr {
79-
use Fallibility::*;
8079
match self {
81-
Fallible => CollectionAllocErr::CapacityOverflow,
82-
Infallible => panic!("Hash table capacity overflow"),
80+
Fallibility::Fallible => CollectionAllocErr::CapacityOverflow,
81+
Fallibility::Infallible => panic!("Hash table capacity overflow"),
8382
}
8483
}
8584

8685
/// Error to return on allocation error.
8786
#[cfg_attr(feature = "inline-more", inline)]
8887
fn alloc_err(self, layout: Layout) -> CollectionAllocErr {
89-
use Fallibility::*;
9088
match self {
91-
Fallible => CollectionAllocErr::AllocErr { layout },
92-
Infallible => handle_alloc_error(layout),
89+
Fallibility::Fallible => CollectionAllocErr::AllocErr { layout },
90+
Fallibility::Infallible => handle_alloc_error(layout),
9391
}
9492
}
9593
}

0 commit comments

Comments
 (0)