Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sim82 committed Nov 20, 2023
1 parent e4f660f commit bce6c96
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
10 changes: 2 additions & 8 deletions src/game.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
use bevy::prelude::*;
use bevy_prototype_lyon::{prelude::*, shapes};
use hexagon_tiles::hexagon::Hex;
use rand_distr::Normal;

use crate::{
camera::CameraTarget,
droid::{ai::new_shooting_droid_ai, AiDroidBundle, DroidBundle, PlayerDroidBundle},
hexton::{HextonBundle, HEXTON_VERTICES},
input::InputTarget,
particle::ColorGenerator,
droid::{ai::new_shooting_droid_ai, AiDroidBundle, DroidBundle},
player::{PlayerMarker, PlayerState},
portal::Portal,
prelude::*,
Expand Down Expand Up @@ -61,8 +56,7 @@ fn game_setup(
// .insert(InputTarget)
// .insert(CameraTarget)
.insert(GameMarker)
.insert(PlayerMarker)
.id();
.insert(PlayerMarker);

let my_shape_builder = GeometryBuilder::build_as(&shape);

Expand Down
2 changes: 1 addition & 1 deletion src/input.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
droid::{AttackRequest, PlayerDroidBundle, TargetDirection},
droid::{AttackRequest, TargetDirection},
hexton::HextonInput,
player::PlayerState,
portal::PortalToggleRequest,
Expand Down
7 changes: 7 additions & 0 deletions src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub enum PlayerState {
#[derive(Component)]
pub struct PlayerMarker;

#[allow(clippy::type_complexity)]
fn enter_droid(
mut commands: Commands,
query: Query<Entity, (With<PlayerMarker>, With<DroidMarker>)>,
Expand All @@ -26,6 +27,8 @@ fn enter_droid(
.insert(CameraTarget);
}
}

#[allow(clippy::type_complexity)]
fn exit_droid(
mut commands: Commands,
query: Query<Entity, (With<PlayerMarker>, With<DroidMarker>, With<InputTarget>)>,
Expand All @@ -37,6 +40,8 @@ fn exit_droid(
.remove::<CameraTarget>();
}
}

#[allow(clippy::type_complexity)]
fn enter_ship(
mut commands: Commands,
query: Query<Entity, (With<PlayerMarker>, With<ShipMarker>)>,
Expand All @@ -48,6 +53,8 @@ fn enter_ship(
.insert(CameraTarget);
}
}

#[allow(clippy::type_complexity)]
fn exit_ship(
mut commands: Commands,
query: Query<Entity, (With<PlayerMarker>, With<ShipMarker>, With<InputTarget>)>,
Expand Down

0 comments on commit bce6c96

Please sign in to comment.