Skip to content

Commit 51fbe0f

Browse files
committed
Clippy crossbeam-skiplist
1 parent 2f9c74a commit 51fbe0f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

crossbeam-skiplist/src/base.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,8 @@ where
517517
}
518518

519519
/// Returns an iterator over a subset of entries in the skip list.
520-
pub fn ref_range<'a, 'g, Q, R>(&'a self, range: R) -> RefRange<'a, Q, R, K, V>
520+
#[allow(clippy::needless_lifetimes)]
521+
pub fn ref_range<'a, Q, R>(&'a self, range: R) -> RefRange<'a, Q, R, K, V>
521522
where
522523
K: Borrow<Q>,
523524
R: RangeBounds<Q>,
@@ -725,11 +726,9 @@ where
725726
break;
726727
}
727728
result = Some(c);
728-
} else {
729-
if above_lower_bound(&bound, c.key.borrow()) {
730-
result = Some(c);
731-
break;
732-
}
729+
} else if above_lower_bound(&bound, c.key.borrow()) {
730+
result = Some(c);
731+
break;
733732
}
734733

735734
// Move one step forward.

crossbeam-skiplist/src/map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ impl<'a, K, V> Entry<'a, K, V> {
252252
impl<K, V> Drop for Entry<'_, K, V> {
253253
fn drop(&mut self) {
254254
unsafe {
255-
ManuallyDrop::into_inner(ptr::read(&mut self.inner)).release_with_pin(epoch::pin);
255+
ManuallyDrop::into_inner(ptr::read(&self.inner)).release_with_pin(epoch::pin);
256256
}
257257
}
258258
}

0 commit comments

Comments
 (0)