Skip to content

Commit 0780ee4

Browse files
committed
chore: cleanups, clippys
1 parent 8060540 commit 0780ee4

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/shader_utils/texture_tooling.rs

-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ pub fn swap_3d_tex_from_idx(
6060
}
6161
}
6262
});
63-
return;
6463
}
6564
}
6665

@@ -111,6 +110,5 @@ pub fn swap_2d_tex_from_idx(
111110
}
112111
}
113112
});
114-
return;
115113
}
116114
}

src/utils.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ impl ShadplayWindowDims {
101101
}
102102

103103
/// Resource: All the shapes we have the option of displaying. 3d Only.
104+
#[allow(clippy::type_complexity)]
104105
#[derive(Resource, Default)]
105106
pub struct ShapeOptions(
106107
pub Vec<(
@@ -371,7 +372,7 @@ pub fn setup_2d(
371372
user_textures.insert(0, texture.clone());
372373

373374
// 2D camera
374-
commands.spawn((Camera2d { ..default() }, Cam2D));
375+
commands.spawn((Camera2d::default(), Cam2D));
375376
info!("Spawned 2d Cam");
376377

377378
let win = windows
@@ -453,10 +454,9 @@ pub fn update_mouse_pos(
453454

454455
// Is the mouse on our window?
455456
if shadplay_win_dims.hittest(mouse_xy) {
456-
for (_, shad_mat) in shader_mat.iter_mut() {
457+
if let Some((_, shad_mat)) = shader_mat.iter_mut().next() {
457458
let sh_xy = shadplay_win_dims.to_uv(mouse_xy);
458459
shad_mat.mouse_pos = sh_xy.into();
459-
return;
460460
}
461461
}
462462
}

0 commit comments

Comments
 (0)