Skip to content

Commit b18db6c

Browse files
committed
Fix clippy warnings
1 parent 9f558f5 commit b18db6c

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
@@ -145,7 +145,7 @@ fn h2(hash: u64) -> u8 {
145145
/// (skipping over 1 group), then 3 groups (skipping over 2 groups), and so on.
146146
///
147147
/// Proof that the probe will visit every group in the table:
148-
/// https://fgiesen.wordpress.com/2015/02/22/triangular-numbers-mod-2n/
148+
/// <https://fgiesen.wordpress.com/2015/02/22/triangular-numbers-mod-2n/>
149149
struct ProbeSeq {
150150
bucket_mask: usize,
151151
pos: usize,
@@ -935,12 +935,12 @@ impl<T> RawTable<T> {
935935
/// should be dropped using a `RawIter` before freeing the allocation.
936936
#[inline]
937937
pub fn into_alloc(self) -> Option<(NonNull<u8>, Layout)> {
938-
let alloc = if !self.is_empty_singleton() {
938+
let alloc = if self.is_empty_singleton() {
939+
None
940+
} else {
939941
let (layout, _) = calculate_layout::<T>(self.buckets())
940942
.unwrap_or_else(|| unsafe { hint::unreachable_unchecked() });
941943
Some((self.ctrl.cast(), layout))
942-
} else {
943-
None
944944
};
945945
mem::forget(self);
946946
alloc

0 commit comments

Comments
 (0)