Skip to content

Commit

Permalink
Cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyTornetta committed Oct 17, 2023
1 parent 478ff9a commit 6947e34
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
13 changes: 4 additions & 9 deletions cosmos_client/src/music/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ impl Default for VolumeSetting {

fn monitor_background_song(bg_song: Res<BackgroundSong>, mut audio_instances: ResMut<Assets<AudioInstance>>, mut commands: Commands) {
if let Some(instance) = audio_instances.get_mut(&bg_song.0) {
match instance.state() {
PlaybackState::Stopped => {
commands.remove_resource::<BackgroundSong>();
}
_ => {}
if instance.state() == PlaybackState::Stopped {
commands.remove_resource::<BackgroundSong>();
}
}
}
Expand Down Expand Up @@ -77,10 +74,8 @@ fn play_music_when_enter_new_sector(
};

if let Some(last_play_sector) = last_play_sector {
if background_song.is_none() {
if last_play_sector.0 != location.sector {
event_writer.send_default();
}
if background_song.is_none() && last_play_sector.0 != location.sector {
event_writer.send_default();
}
}

Expand Down
2 changes: 1 addition & 1 deletion cosmos_client/src/plugin/client_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ impl PluginGroup for ClientPluginGroup {
// NOTE: Load this after renderer initialization so that it knows about the supported
// compressed texture formats
.add(GltfPlugin::default())
.add(AnimationPlugin::default())
.add(AnimationPlugin)
}
}
1 change: 0 additions & 1 deletion cosmos_client/src/structure/systems/laser_cannon_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ fn apply_thruster_sound(
instance: playing_sound,
..Default::default()
}],
..Default::default()
},
DespawnOnNoEmissions,
location,
Expand Down
1 change: 0 additions & 1 deletion cosmos_client/src/structure/systems/thruster_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ fn apply_thruster_sound(
max_distance: 100.0,
peak_volume: 0.3,
stop_tween,
..Default::default()
}],
},
));
Expand Down
2 changes: 1 addition & 1 deletion cosmos_server/src/events/structure/ship/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn monitor_set_movement_events(
server.broadcast_message(
NettyChannelServer::Unreliable,
cosmos_encoder::serialize(&ServerUnreliableMessages::SetMovement {
movement: ev.movement.clone(),
movement: ev.movement,
ship_entity: ev.ship,
}),
);
Expand Down

0 comments on commit 6947e34

Please sign in to comment.