Skip to content

Commit

Permalink
clippy: Fix remaining semicolon_if_nothing_returned lints. (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Mar 9, 2024
1 parent 256efb7 commit 0c94a07
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions crates/tests/tests/smoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ use vello_tests::TestParams;
#[test]
#[cfg_attr(skip_gpu_tests, ignore)]
fn simple_square_gpu() {
simple_square(false)
simple_square(false);
}

#[test]
// The fine shader still requires a GPU, and so we still get a wgpu device
// 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) {
Expand Down
2 changes: 1 addition & 1 deletion examples/with_bevy/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fn main() {
.add_systems(Update, cube_rotator_system)
.add_plugins(ExtractComponentPlugin::<VelloScene>::default())
.add_systems(Update, render_fragment)
.run()
.run();
}

// Marks the main pass cube, to which the texture is applied.
Expand Down
8 changes: 4 additions & 4 deletions examples/with_winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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}");
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions integrations/vello_svg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ pub fn render_tree_with<F: FnMut(&mut Scene, &usvg::Node) -> 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) {
Expand All @@ -110,7 +110,7 @@ pub fn render_tree_with<F: FnMut(&mut Scene, &usvg::Node) -> 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) {
Expand All @@ -120,11 +120,11 @@ pub fn render_tree_with<F: FnMut(&mut Scene, &usvg::Node) -> 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();
}
}
}
Expand Down

0 comments on commit 0c94a07

Please sign in to comment.