Skip to content

Commit 739dbc4

Browse files
committed
Fix clippy::semicolon_if_nothing_returned warnings
1 parent 1635b72 commit 739dbc4

File tree

17 files changed

+40
-39
lines changed

17 files changed

+40
-39
lines changed

src/binary_heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ where
222222
/// assert!(heap.is_empty());
223223
/// ```
224224
pub fn clear(&mut self) {
225-
self.data.clear()
225+
self.data.clear();
226226
}
227227

228228
/// Returns the length of the binary heap.

src/deque.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ impl<T, S: VecStorage<T> + ?Sized> Extend<T> for DequeInner<T, S> {
896896
}
897897
impl<'a, T: 'a + Copy, S: VecStorage<T> + ?Sized> Extend<&'a T> for DequeInner<T, S> {
898898
fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I) {
899-
self.extend(iter.into_iter().copied())
899+
self.extend(iter.into_iter().copied());
900900
}
901901
}
902902

src/histbuf.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl<T, S: HistBufStorage<T> + ?Sized> HistoryBufferInner<T, S> {
293293
ptr::drop_in_place(ptr::slice_from_raw_parts_mut(
294294
self.data.borrow_mut().as_mut_ptr().cast::<T>(),
295295
self.len(),
296-
))
296+
));
297297
}
298298
}
299299

@@ -514,7 +514,7 @@ where
514514
where
515515
I: IntoIterator<Item = &'a T>,
516516
{
517-
self.extend(iter.into_iter().cloned())
517+
self.extend(iter.into_iter().cloned());
518518
}
519519
}
520520

@@ -818,7 +818,7 @@ mod tests {
818818
assert_eq_iter(
819819
[head, tail].iter().copied().flatten(),
820820
buffer.oldest_ordered(),
821-
)
821+
);
822822
}
823823
}
824824

src/indexmap.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ where
12981298
where
12991299
I: IntoIterator<Item = (&'a K, &'a V)>,
13001300
{
1301-
self.extend(iterable.into_iter().map(|(&key, &value)| (key, value)))
1301+
self.extend(iterable.into_iter().map(|(&key, &value)| (key, value)));
13021302
}
13031303
}
13041304

@@ -1481,7 +1481,7 @@ mod tests {
14811481
mem::size_of::<u16>() // hash
14821482
) + // buckets
14831483
mem::size_of::<usize>() // entries.length
1484-
)
1484+
);
14851485
}
14861486

14871487
#[test]
@@ -1673,7 +1673,7 @@ mod tests {
16731673
assert_eq!(value, *v.insert(value).unwrap());
16741674
}
16751675
};
1676-
assert_eq!(value, *src.get(&key).unwrap())
1676+
assert_eq!(value, *src.get(&key).unwrap());
16771677
}
16781678

16791679
#[test]
@@ -1693,7 +1693,7 @@ mod tests {
16931693
panic!("Entry not found");
16941694
}
16951695
};
1696-
assert_eq!(value2, *src.get(&key).unwrap())
1696+
assert_eq!(value2, *src.get(&key).unwrap());
16971697
}
16981698

16991699
#[test]

src/indexset.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ impl<T, S, const N: usize> IndexSet<T, S, N> {
212212
/// assert!(v.is_empty());
213213
/// ```
214214
pub fn clear(&mut self) {
215-
self.map.clear()
215+
self.map.clear();
216216
}
217217
}
218218

@@ -560,7 +560,7 @@ where
560560
where
561561
I: IntoIterator<Item = T>,
562562
{
563-
self.map.extend(iterable.into_iter().map(|k| (k, ())))
563+
self.map.extend(iterable.into_iter().map(|k| (k, ())));
564564
}
565565
}
566566

@@ -573,7 +573,7 @@ where
573573
where
574574
I: IntoIterator<Item = &'a T>,
575575
{
576-
self.extend(iterable.into_iter().cloned())
576+
self.extend(iterable.into_iter().cloned());
577577
}
578578
}
579579

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
clippy::option_if_let_else,
148148
clippy::ptr_as_ptr,
149149
clippy::doc_markdown,
150+
clippy::semicolon_if_nothing_returned
150151
)]
151152

152153
pub use binary_heap::BinaryHeap;

src/linear_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ where
8585
/// assert!(map.is_empty());
8686
/// ```
8787
pub fn clear(&mut self) {
88-
self.buffer.clear()
88+
self.buffer.clear();
8989
}
9090

9191
/// Returns true if the map contains a value for the specified key.

src/pool/arc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ pub trait ArcPool: Sized {
148148

149149
/// Add a statically allocated memory block to the memory pool
150150
fn manage(block: &'static mut ArcBlock<Self::Data>) {
151-
Self::singleton().manage(block)
151+
Self::singleton().manage(block);
152152
}
153153
}
154154

@@ -315,7 +315,7 @@ where
315315
where
316316
H: Hasher,
317317
{
318-
(**self).hash(state)
318+
(**self).hash(state);
319319
}
320320
}
321321

src/pool/boxed.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ pub trait BoxPool: Sized {
166166

167167
/// Add a statically allocated memory block to the memory pool
168168
fn manage(block: &'static mut BoxBlock<Self::Data>) {
169-
Self::singleton().manage(block)
169+
Self::singleton().manage(block);
170170
}
171171
}
172172

@@ -259,7 +259,7 @@ where
259259
where
260260
H: Hasher,
261261
{
262-
(**self).hash(state)
262+
(**self).hash(state);
263263
}
264264
}
265265

src/pool/object.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub trait ObjectPool: Sized {
135135

136136
/// Adds a statically allocate object to the pool
137137
fn manage(block: &'static mut ObjectBlock<Self::Data>) {
138-
Self::singleton().manage(block)
138+
Self::singleton().manage(block);
139139
}
140140
}
141141

@@ -262,7 +262,7 @@ where
262262
where
263263
H: Hasher,
264264
{
265-
(**self).hash(state)
265+
(**self).hash(state);
266266
}
267267
}
268268

0 commit comments

Comments
 (0)