From 0c94a070d4fca91a66473eea347fa06eb26aebec Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Sat, 9 Mar 2024 22:33:58 +0700 Subject: [PATCH] clippy: Fix remaining semicolon_if_nothing_returned lints. (#508) --- crates/tests/tests/smoke.rs | 4 ++-- examples/with_bevy/src/main.rs | 2 +- examples/with_winit/src/lib.rs | 8 ++++---- integrations/vello_svg/src/lib.rs | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/crates/tests/tests/smoke.rs b/crates/tests/tests/smoke.rs index 17920f346..58113b6ad 100644 --- a/crates/tests/tests/smoke.rs +++ b/crates/tests/tests/smoke.rs @@ -11,7 +11,7 @@ use vello_tests::TestParams; #[test] #[cfg_attr(skip_gpu_tests, ignore)] fn simple_square_gpu() { - simple_square(false) + simple_square(false); } #[test] @@ -19,7 +19,7 @@ fn simple_square_gpu() { // skip this for now #[cfg_attr(skip_gpu_tests, ignore)] fn simple_square_cpu() { - simple_square(true) + simple_square(true); } fn simple_square(use_cpu: bool) { diff --git a/examples/with_bevy/src/main.rs b/examples/with_bevy/src/main.rs index 9e4d8ae0c..110805460 100644 --- a/examples/with_bevy/src/main.rs +++ b/examples/with_bevy/src/main.rs @@ -102,7 +102,7 @@ fn main() { .add_systems(Update, cube_rotator_system) .add_plugins(ExtractComponentPlugin::::default()) .add_systems(Update, render_fragment) - .run() + .run(); } // Marks the main pass cube, to which the texture is applied. diff --git a/examples/with_winit/src/lib.rs b/examples/with_winit/src/lib.rs index a4174a17c..6bcc88977 100644 --- a/examples/with_winit/src/lib.rs +++ b/examples/with_winit/src/lib.rs @@ -203,14 +203,14 @@ fn run( if event.state == ElementState::Pressed { match event.logical_key.as_ref() { Key::Named(NamedKey::ArrowLeft) => { - scene_ix = scene_ix.saturating_sub(1) + scene_ix = scene_ix.saturating_sub(1); } Key::Named(NamedKey::ArrowRight) => { - scene_ix = scene_ix.saturating_add(1) + scene_ix = scene_ix.saturating_add(1); } Key::Named(NamedKey::ArrowUp) => complexity += 1, Key::Named(NamedKey::ArrowDown) => { - complexity = complexity.saturating_sub(1) + complexity = complexity.saturating_sub(1); } Key::Named(NamedKey::Space) => { transform = Affine::IDENTITY; @@ -640,7 +640,7 @@ fn store_profiling( println!("Wrote trace to path {path:?}"); } Err(e) => { - log::warn!("Failed to write trace {e}") + log::warn!("Failed to write trace {e}"); } } } diff --git a/integrations/vello_svg/src/lib.rs b/integrations/vello_svg/src/lib.rs index d5d5c58fa..2a00055a6 100644 --- a/integrations/vello_svg/src/lib.rs +++ b/integrations/vello_svg/src/lib.rs @@ -95,13 +95,13 @@ pub fn render_tree_with Result<(), E>, E>( local_path.move_to(most_recent_initial); } most_recent_initial = (p.x.into(), p.y.into()); - local_path.move_to(most_recent_initial) + local_path.move_to(most_recent_initial); } usvg::tiny_skia_path::PathSegment::LineTo(p) => { if std::mem::take(&mut just_closed) { local_path.move_to(most_recent_initial); } - local_path.line_to(Point::new(p.x as f64, p.y as f64)) + local_path.line_to(Point::new(p.x as f64, p.y as f64)); } usvg::tiny_skia_path::PathSegment::QuadTo(p1, p2) => { if std::mem::take(&mut just_closed) { @@ -110,7 +110,7 @@ pub fn render_tree_with Result<(), E>, E>( local_path.quad_to( Point::new(p1.x as f64, p1.y as f64), Point::new(p2.x as f64, p2.y as f64), - ) + ); } usvg::tiny_skia_path::PathSegment::CubicTo(p1, p2, p3) => { if std::mem::take(&mut just_closed) { @@ -120,11 +120,11 @@ pub fn render_tree_with Result<(), E>, E>( Point::new(p1.x as f64, p1.y as f64), Point::new(p2.x as f64, p2.y as f64), Point::new(p3.x as f64, p3.y as f64), - ) + ); } usvg::tiny_skia_path::PathSegment::Close => { just_closed = true; - local_path.close_path() + local_path.close_path(); } } }