Skip to content

Commit

Permalink
chore: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisSmuda committed Feb 19, 2024
1 parent e655e2e commit 4713d9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub const WINDOW_HEIGHT: f32 = 600.;

// Colors
pub const BG_COLOR: Color = Color::rgb(38. / 255., 20. / 255., 40. / 255.);
pub const PLAYER_COLOR: Color = Color::rgb(255. / 255., 228. / 255., 120. / 255.);
pub const PLAYER_COLOR: Color = Color::rgb(1.0, 228. / 255., 120. / 255.);
pub const ENEMY_COLOR: Color = Color::rgb(60. / 255., 163. / 255., 112. / 255.);

pub const NORMAL_BUTTON: Color = Color::rgb(0.15, 0.15, 0.15);
Expand Down
5 changes: 1 addition & 4 deletions src/game/enemies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ fn spawn_enemies(mut commands: Commands, time: Res<Time>, mut timer: ResMut<Spaw
transform: Transform::from_translation(spawn_position),
..default()
})
.insert(Enemy {
speed: speed,
direction: direction,
})
.insert(Enemy { speed, direction })
.insert(Collider::Enemy);
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/gameover/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
font: asset_server.load("fonts/Efforts.ttf"),
font_size: 60.0,
color: Color::WHITE,
..default()
},
),
..default()
Expand Down Expand Up @@ -65,7 +64,6 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
font: asset_server.load("fonts/Efforts.ttf"),
font_size: 40.0,
color: Color::rgb(0.9, 0.9, 0.9),
..default()
},
));
});
Expand All @@ -74,6 +72,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.insert_resource(MenuData { menu_node });
}

#[allow(clippy::type_complexity)]
fn update_gameover(
mut next_state: ResMut<NextState<AppState>>,
mut interaction_query: Query<
Expand Down

0 comments on commit 4713d9a

Please sign in to comment.