Skip to content

Commit c5a2ea0

Browse files
Fix clippy::semicolon_if_nothing_returned lints
1 parent ed102fa commit c5a2ea0

File tree

8 files changed

+29
-28
lines changed

8 files changed

+29
-28
lines changed

src/box2d.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,16 +375,16 @@ where
375375
for point in points {
376376
let p = point.borrow();
377377
if p.x < min_x {
378-
min_x = p.x
378+
min_x = p.x;
379379
}
380380
if p.x > max_x {
381-
max_x = p.x
381+
max_x = p.x;
382382
}
383383
if p.y < min_y {
384-
min_y = p.y
384+
min_y = p.y;
385385
}
386386
if p.y > max_y {
387-
max_y = p.y
387+
max_y = p.y;
388388
}
389389
}
390390

src/box3d.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,22 +342,22 @@ where
342342
for point in points {
343343
let p = point.borrow();
344344
if p.x < min_x {
345-
min_x = p.x
345+
min_x = p.x;
346346
}
347347
if p.x > max_x {
348-
max_x = p.x
348+
max_x = p.x;
349349
}
350350
if p.y < min_y {
351-
min_y = p.y
351+
min_y = p.y;
352352
}
353353
if p.y > max_y {
354-
max_y = p.y
354+
max_y = p.y;
355355
}
356356
if p.z < min_z {
357-
min_z = p.z
357+
min_z = p.z;
358358
}
359359
if p.z > max_z {
360-
max_z = p.z
360+
max_z = p.z;
361361
}
362362
}
363363

src/length.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ impl<T: Mul, U> Mul<T> for Length<T, U> {
273273
impl<T: Copy + Mul<T, Output = T>, U> MulAssign<T> for Length<T, U> {
274274
#[inline]
275275
fn mul_assign(&mut self, scale: T) {
276-
*self = *self * scale
276+
*self = *self * scale;
277277
}
278278
}
279279

@@ -291,7 +291,7 @@ impl<T: Div, U> Div<T> for Length<T, U> {
291291
impl<T: Copy + Div<T, Output = T>, U> DivAssign<T> for Length<T, U> {
292292
#[inline]
293293
fn div_assign(&mut self, scale: T) {
294-
*self = *self / scale
294+
*self = *self / scale;
295295
}
296296
}
297297

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
//! foreign function interfaces (provided the underlying scalar type is also `repr(C)`).
4040
//!
4141
#![deny(unconditional_recursion)]
42+
#![warn(clippy::semicolon_if_nothing_returned)]
4243

4344
pub use crate::angle::Angle;
4445
pub use crate::box2d::Box2D;

src/point.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ impl<T: Add, U> Add<Vector2D<T, U>> for Point2D<T, U> {
590590
impl<T: Copy + Add<T, Output = T>, U> AddAssign<Vector2D<T, U>> for Point2D<T, U> {
591591
#[inline]
592592
fn add_assign(&mut self, other: Vector2D<T, U>) {
593-
*self = *self + other
593+
*self = *self + other;
594594
}
595595
}
596596

@@ -632,7 +632,7 @@ impl<T: Sub, U> Sub<Vector2D<T, U>> for Point2D<T, U> {
632632
impl<T: Copy + Sub<T, Output = T>, U> SubAssign<Vector2D<T, U>> for Point2D<T, U> {
633633
#[inline]
634634
fn sub_assign(&mut self, other: Vector2D<T, U>) {
635-
*self = *self - other
635+
*self = *self - other;
636636
}
637637
}
638638

@@ -648,7 +648,7 @@ impl<T: Copy + Mul, U> Mul<T> for Point2D<T, U> {
648648
impl<T: Copy + Mul<T, Output = T>, U> MulAssign<T> for Point2D<T, U> {
649649
#[inline]
650650
fn mul_assign(&mut self, scale: T) {
651-
*self = *self * scale
651+
*self = *self * scale;
652652
}
653653
}
654654

@@ -681,7 +681,7 @@ impl<T: Copy + Div, U> Div<T> for Point2D<T, U> {
681681
impl<T: Copy + Div<T, Output = T>, U> DivAssign<T> for Point2D<T, U> {
682682
#[inline]
683683
fn div_assign(&mut self, scale: T) {
684-
*self = *self / scale
684+
*self = *self / scale;
685685
}
686686
}
687687

@@ -1424,7 +1424,7 @@ impl<T: Add, U> Add<Vector3D<T, U>> for Point3D<T, U> {
14241424
impl<T: Copy + Add<T, Output = T>, U> AddAssign<Vector3D<T, U>> for Point3D<T, U> {
14251425
#[inline]
14261426
fn add_assign(&mut self, other: Vector3D<T, U>) {
1427-
*self = *self + other
1427+
*self = *self + other;
14281428
}
14291429
}
14301430

@@ -1471,7 +1471,7 @@ impl<T: Sub, U> Sub<Vector3D<T, U>> for Point3D<T, U> {
14711471
impl<T: Copy + Sub<T, Output = T>, U> SubAssign<Vector3D<T, U>> for Point3D<T, U> {
14721472
#[inline]
14731473
fn sub_assign(&mut self, other: Vector3D<T, U>) {
1474-
*self = *self - other
1474+
*self = *self - other;
14751475
}
14761476
}
14771477

src/rect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ mod tests {
905905
}
906906
y += 0.1;
907907
}
908-
x += 0.1
908+
x += 0.1;
909909
}
910910
}
911911

src/scale.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ impl<T: Default, Src, Dst> Default for Scale<T, Src, Dst> {
416416

417417
impl<T: Hash, Src, Dst> Hash for Scale<T, Src, Dst> {
418418
fn hash<H: Hasher>(&self, state: &mut H) {
419-
self.0.hash(state)
419+
self.0.hash(state);
420420
}
421421
}
422422

src/vector.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ impl<'a, T: 'a + Add<Output = T> + Copy + Zero, U: 'a> Sum<&'a Self> for Vector2
788788
impl<T: Copy + Add<T, Output = T>, U> AddAssign for Vector2D<T, U> {
789789
#[inline]
790790
fn add_assign(&mut self, other: Self) {
791-
*self = *self + other
791+
*self = *self + other;
792792
}
793793
}
794794

@@ -804,7 +804,7 @@ impl<T: Sub, U> Sub for Vector2D<T, U> {
804804
impl<T: Copy + Sub<T, Output = T>, U> SubAssign<Vector2D<T, U>> for Vector2D<T, U> {
805805
#[inline]
806806
fn sub_assign(&mut self, other: Self) {
807-
*self = *self - other
807+
*self = *self - other;
808808
}
809809
}
810810

@@ -820,7 +820,7 @@ impl<T: Copy + Mul, U> Mul<T> for Vector2D<T, U> {
820820
impl<T: Copy + Mul<T, Output = T>, U> MulAssign<T> for Vector2D<T, U> {
821821
#[inline]
822822
fn mul_assign(&mut self, scale: T) {
823-
*self = *self * scale
823+
*self = *self * scale;
824824
}
825825
}
826826

@@ -853,7 +853,7 @@ impl<T: Copy + Div, U> Div<T> for Vector2D<T, U> {
853853
impl<T: Copy + Div<T, Output = T>, U> DivAssign<T> for Vector2D<T, U> {
854854
#[inline]
855855
fn div_assign(&mut self, scale: T) {
856-
*self = *self / scale
856+
*self = *self / scale;
857857
}
858858
}
859859

@@ -1713,7 +1713,7 @@ impl<'a, T: 'a + Add<Output = T> + Copy + Zero, U: 'a> Sum<&'a Self> for Vector3
17131713
impl<T: Copy + Add<T, Output = T>, U> AddAssign for Vector3D<T, U> {
17141714
#[inline]
17151715
fn add_assign(&mut self, other: Self) {
1716-
*self = *self + other
1716+
*self = *self + other;
17171717
}
17181718
}
17191719

@@ -1729,7 +1729,7 @@ impl<T: Sub, U> Sub for Vector3D<T, U> {
17291729
impl<T: Copy + Sub<T, Output = T>, U> SubAssign<Vector3D<T, U>> for Vector3D<T, U> {
17301730
#[inline]
17311731
fn sub_assign(&mut self, other: Self) {
1732-
*self = *self - other
1732+
*self = *self - other;
17331733
}
17341734
}
17351735

@@ -1745,7 +1745,7 @@ impl<T: Copy + Mul, U> Mul<T> for Vector3D<T, U> {
17451745
impl<T: Copy + Mul<T, Output = T>, U> MulAssign<T> for Vector3D<T, U> {
17461746
#[inline]
17471747
fn mul_assign(&mut self, scale: T) {
1748-
*self = *self * scale
1748+
*self = *self * scale;
17491749
}
17501750
}
17511751

@@ -1779,7 +1779,7 @@ impl<T: Copy + Div, U> Div<T> for Vector3D<T, U> {
17791779
impl<T: Copy + Div<T, Output = T>, U> DivAssign<T> for Vector3D<T, U> {
17801780
#[inline]
17811781
fn div_assign(&mut self, scale: T) {
1782-
*self = *self / scale
1782+
*self = *self / scale;
17831783
}
17841784
}
17851785

0 commit comments

Comments
 (0)