Skip to content

Commit 813fa8a

Browse files
committed
Auto merge of #287 - steffahn:clippy_fix_ci, r=Amanieu
Fix instances of clippy::semicolon_if_nothing_returned Fix instances of clippy::semicolon_if_nothing_returned in order to make CI pass again.
2 parents 2eaeebb + 87d8578 commit 813fa8a

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

src/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,7 @@ pub(super) struct ConsumeAllOnDrop<'a, T: Iterator>(pub &'a mut T);
16721672
impl<T: Iterator> Drop for ConsumeAllOnDrop<'_, T> {
16731673
#[cfg_attr(feature = "inline-more", inline)]
16741674
fn drop(&mut self) {
1675-
self.0.for_each(drop)
1675+
self.0.for_each(drop);
16761676
}
16771677
}
16781678

@@ -1709,7 +1709,7 @@ impl<K, V, A: Allocator + Clone> DrainFilterInner<'_, K, V, A> {
17091709
F: FnMut(&K, &mut V) -> bool,
17101710
{
17111711
unsafe {
1712-
while let Some(item) = self.iter.next() {
1712+
for item in &mut self.iter {
17131713
let &mut (ref key, ref mut value) = item.as_mut();
17141714
if f(key, value) {
17151715
return Some(self.table.remove(item));

src/raw/alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ mod inner {
4747
}
4848
#[inline]
4949
unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) {
50-
dealloc(ptr.as_ptr(), layout)
50+
dealloc(ptr.as_ptr(), layout);
5151
}
5252
}
5353
impl Default for Global {

src/raw/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ fn cold() {}
5959
#[inline]
6060
fn likely(b: bool) -> bool {
6161
if !b {
62-
cold()
62+
cold();
6363
}
6464
b
6565
}
6666
#[cfg(not(feature = "nightly"))]
6767
#[inline]
6868
fn unlikely(b: bool) -> bool {
6969
if b {
70-
cold()
70+
cold();
7171
}
7272
b
7373
}
@@ -502,7 +502,7 @@ impl<T, A: Allocator + Clone> RawTable<T, A> {
502502
/// Deallocates the table without dropping any entries.
503503
#[cfg_attr(feature = "inline-more", inline)]
504504
unsafe fn free_buckets(&mut self) {
505-
self.table.free_buckets(TableLayout::new::<T>())
505+
self.table.free_buckets(TableLayout::new::<T>());
506506
}
507507

508508
/// Returns pointer to one past last element of data table.
@@ -537,7 +537,7 @@ impl<T, A: Allocator + Clone> RawTable<T, A> {
537537
#[deprecated(since = "0.8.1", note = "use erase or remove instead")]
538538
pub unsafe fn erase_no_drop(&mut self, item: &Bucket<T>) {
539539
let index = self.bucket_index(item);
540-
self.table.erase(index)
540+
self.table.erase(index);
541541
}
542542

543543
/// Erases an element from the table, dropping it in place.
@@ -586,7 +586,7 @@ impl<T, A: Allocator + Clone> RawTable<T, A> {
586586
/// Marks all table buckets as empty without dropping their contents.
587587
#[cfg_attr(feature = "inline-more", inline)]
588588
pub fn clear_no_drop(&mut self) {
589-
self.table.clear_no_drop()
589+
self.table.clear_no_drop();
590590
}
591591

592592
/// Removes all elements from the table without freeing the backing memory.
@@ -631,7 +631,7 @@ impl<T, A: Allocator + Clone> RawTable<T, A> {
631631
if min_buckets < self.buckets() {
632632
// Fast path if the table is empty
633633
if self.table.items == 0 {
634-
*self = Self::with_capacity_in(min_size, self.table.alloc.clone())
634+
*self = Self::with_capacity_in(min_size, self.table.alloc.clone());
635635
} else {
636636
// Avoid `Result::unwrap_or_else` because it bloats LLVM IR.
637637
if self
@@ -1271,7 +1271,7 @@ impl<A: Allocator + Clone> RawTableInner<A> {
12711271
/// the end of the array.
12721272
#[inline]
12731273
unsafe fn set_ctrl_h2(&self, index: usize, hash: u64) {
1274-
self.set_ctrl(index, h2(hash))
1274+
self.set_ctrl(index, h2(hash));
12751275
}
12761276

12771277
#[inline]
@@ -1646,7 +1646,7 @@ impl<T: Clone, A: Allocator + Clone> Clone for RawTable<T, A> {
16461646

16471647
self.clone_from_spec(source, |self_| {
16481648
// We need to leave the table in an empty state.
1649-
self_.clear_no_drop()
1649+
self_.clear_no_drop();
16501650
});
16511651
}
16521652
}

src/scopeguard.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ where
4444
{
4545
#[inline]
4646
fn drop(&mut self) {
47-
(self.dropfn)(&mut self.value)
47+
(self.dropfn)(&mut self.value);
4848
}
4949
}

src/set.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ impl<T, S, A: Allocator + Clone> HashSet<T, S, A> {
378378
/// ```
379379
#[cfg_attr(feature = "inline-more", inline)]
380380
pub fn clear(&mut self) {
381-
self.map.clear()
381+
self.map.clear();
382382
}
383383
}
384384

@@ -559,7 +559,7 @@ where
559559
/// ```
560560
#[cfg_attr(feature = "inline-more", inline)]
561561
pub fn reserve(&mut self, additional: usize) {
562-
self.map.reserve(additional)
562+
self.map.reserve(additional);
563563
}
564564

565565
/// Tries to reserve capacity for at least `additional` more elements to be inserted
@@ -601,7 +601,7 @@ where
601601
/// ```
602602
#[cfg_attr(feature = "inline-more", inline)]
603603
pub fn shrink_to_fit(&mut self) {
604-
self.map.shrink_to_fit()
604+
self.map.shrink_to_fit();
605605
}
606606

607607
/// Shrinks the capacity of the set with a lower limit. It will drop
@@ -627,7 +627,7 @@ where
627627
/// ```
628628
#[cfg_attr(feature = "inline-more", inline)]
629629
pub fn shrink_to(&mut self, min_capacity: usize) {
630-
self.map.shrink_to(min_capacity)
630+
self.map.shrink_to(min_capacity);
631631
}
632632

633633
/// Visits the values representing the difference,

0 commit comments

Comments
 (0)