Skip to content

Commit

Permalink
chore: Run cargo fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
shanecelis committed Apr 21, 2024
1 parent e96d769 commit a24e54d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
4 changes: 1 addition & 3 deletions examples/run_if.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ fn main() {
.init_state::<AppState>()
.add_plugins(InputSequencePlugin::empty().run_in_set(Update, MySet))
.add_event::<MyEvent>()
.configure_sets(Update,
MySet.run_if(in_state(AppState::Game)))
.configure_sets(Update, MySet.run_if(in_state(AppState::Game)))
.add_systems(Startup, setup)
.add_systems(Update, listen_for_myevent)
.add_systems(Update, listen_for_escape_key)
Expand All @@ -45,7 +44,6 @@ fn listen_for_escape_key(
state: Res<State<AppState>>,
mut next_state: ResMut<NextState<AppState>>,
) {

if keys.just_pressed(KeyCode::Escape) {
let new_state = match state.get() {
AppState::Menu => AppState::Game,
Expand Down
8 changes: 3 additions & 5 deletions src/action.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
//! Common actions to do on key sequence matches
use bevy::{
ecs::{
event::{Event, EventWriter},
system::In,
},
use bevy::ecs::{
event::{Event, EventWriter},
system::In,
};

/// Send this event.
Expand Down
5 changes: 1 addition & 4 deletions src/time_limit.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use bevy::{
ecs::system::Resource,
reflect::Reflect
};
use bevy::{ecs::system::Resource, reflect::Reflect};
use std::time::Duration;
/// A time limit specified as frame counts or duration.
#[derive(Clone, Resource, Debug, Reflect)]
Expand Down

0 comments on commit a24e54d

Please sign in to comment.