Skip to content

Commit 469fe14

Browse files
committed
fmt & clippy
1 parent 11bf9b6 commit 469fe14

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

src/drivers/fpv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ pub struct CCFpv;
1515
impl Plugin for CCFpv {
1616
fn build(&self, app: &mut App) {
1717
app.add_rig_component(CCFpv)
18-
.add_startup_system(setup_fpv)
18+
.add_systems(Startup, setup_fpv)
1919
.add_state::<MovementType>()
20-
.add_system(update_fpv_camera);
20+
.add_systems(Update, update_fpv_camera);
2121
}
2222
}
2323

@@ -63,7 +63,7 @@ pub fn update_fpv_camera(
6363
) {
6464
let time_delta_seconds: f32 = time.delta_seconds();
6565
let boost_mult = 5.0f32;
66-
let sensitivity = Vec2::splat(1.0);
66+
let _sensitivity = Vec2::splat(1.0);
6767

6868
let mut move_vec = Vec3::ZERO;
6969

src/drivers/orbit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ impl Plugin for CCOrbit {
1515
fn build(&self, app: &mut App) {
1616
app.add_rig_component(CCOrbit)
1717
.add_state::<Pan>()
18-
.add_startup_system(setup_orbit.after(CCSetupLabel))
19-
.add_system(handle_mouse_scroll)
20-
.add_system(update_orbit_camera);
18+
.add_systems(Startup, setup_orbit.after(CCSetupLabel))
19+
.add_systems(Update, handle_mouse_scroll)
20+
.add_systems(Update, update_orbit_camera);
2121
}
2222
}
2323

src/lib.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ pub mod drivers;
33

44
use bevy::{
55
prelude::{
6-
default, App, Camera, Commands, Component,
7-
OrthographicProjection, Plugin, Query, Res, Resource, SystemSet,
8-
Transform, Vec3, With, Camera3dBundle, Camera2dBundle, Update, Startup, IntoSystemConfigs,
6+
default, App, Camera, Camera2dBundle, Camera3dBundle, Commands, Component,
7+
IntoSystemConfigs, OrthographicProjection, Plugin, Query, Res, Resource, Startup,
8+
SystemSet, Transform, Update, Vec3, With,
99
},
1010
render::camera::ScalingMode,
1111
};
@@ -30,7 +30,10 @@ impl Plugin for ConfigCam {
3030
player: Player::None,
3131
..Default::default()
3232
})
33-
.add_systems(Startup, camera_setup.run_if(is_init_cameras).in_set(CCSetupLabel))
33+
.add_systems(
34+
Startup,
35+
camera_setup.run_if(is_init_cameras).in_set(CCSetupLabel),
36+
)
3437
.add_plugins(CCFpv)
3538
.add_plugins(CCOrbit)
3639
.add_systems(Update, change_driver_system)
@@ -84,7 +87,7 @@ fn is_init_cameras(config: Res<CCConfig>) -> bool {
8487
config.init_cameras
8588
}
8689

87-
fn camera_setup(mut commands: Commands, config: Res<CCConfig>) {
90+
fn camera_setup(mut commands: Commands, _config: Res<CCConfig>) {
8891
commands.spawn((
8992
MainCamera,
9093
PerspectiveCamera,

0 commit comments

Comments
 (0)