diff options
| author | HampusM <hampus@hampusmat.com> | 2026-08-10 01:49:41 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-08-10 01:49:41 +0200 |
| commit | 9a303edb56fb460f2b60aef0bfca15a242381ba0 (patch) | |
| tree | 8e1773343c9afe5c0583796b72e018635b406513 /engine/src | |
| parent | a79511cd3033254d9f3c93857d96f1c39751c730 (diff) | |
style(engine): apply formatting
Diffstat (limited to 'engine/src')
| -rw-r--r-- | engine/src/camera/fly.rs | 16 | ||||
| -rw-r--r-- | engine/src/input.rs | 2 | ||||
| -rw-r--r-- | engine/src/lib.rs | 2 | ||||
| -rw-r--r-- | engine/src/lighting.rs | 2 | ||||
| -rw-r--r-- | engine/src/rendering/backend/opengl/glutin_compat.rs | 4 | ||||
| -rw-r--r-- | engine/src/scene.rs | 2 | ||||
| -rw-r--r-- | engine/src/windowing.rs | 18 |
7 files changed, 27 insertions, 19 deletions
diff --git a/engine/src/camera/fly.rs b/engine/src/camera/fly.rs index b2559fb..80355fa 100644 --- a/engine/src/camera/fly.rs +++ b/engine/src/camera/fly.rs @@ -75,15 +75,13 @@ pub struct Options } fn update( - camera_query: Query< - ( - &mut Camera, - &mut WorldPosition, - &mut Fly, - Option<&ControllableCamera>, - With<ActiveCamera>, - ), - >, + camera_query: Query<( + &mut Camera, + &mut WorldPosition, + &mut Fly, + Option<&ControllableCamera>, + With<ActiveCamera>, + )>, keyboard: Single<Keyboard>, mouse: Single<Mouse>, time: Single<Time>, diff --git a/engine/src/input.rs b/engine/src/input.rs index a86cb1a..c5e6d09 100644 --- a/engine/src/input.rs +++ b/engine/src/input.rs @@ -1,7 +1,7 @@ -use crate::ecs::{declare_entity, pair}; use crate::ecs::extension::Collector as ExtensionCollector; use crate::ecs::pair::ChildOf; use crate::ecs::phase::Phase; +use crate::ecs::{declare_entity, pair}; use crate::windowing::PHASE as WINDOWING_PHASE; pub mod keyboard; diff --git a/engine/src/lib.rs b/engine/src/lib.rs index 0d9f531..f8b91a1 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -22,10 +22,10 @@ pub mod material; pub mod math; pub mod mesh; pub mod model; -pub mod scene; pub mod projection; pub mod reflection; pub mod rendering; +pub mod scene; pub mod texture; pub mod transform; pub mod ui; diff --git a/engine/src/lighting.rs b/engine/src/lighting.rs index eee6afc..5aae795 100644 --- a/engine/src/lighting.rs +++ b/engine/src/lighting.rs @@ -121,7 +121,7 @@ impl Default for EnvironmentalBuilder fn default() -> Self { Self { - ambient_color: Color::Rgb(Rgb { r: 0.2, g: 0.2, b: 0.2 }) + ambient_color: Color::Rgb(Rgb { r: 0.2, g: 0.2, b: 0.2 }), } } } diff --git a/engine/src/rendering/backend/opengl/glutin_compat.rs b/engine/src/rendering/backend/opengl/glutin_compat.rs index f4d20e9..27f82ad 100644 --- a/engine/src/rendering/backend/opengl/glutin_compat.rs +++ b/engine/src/rendering/backend/opengl/glutin_compat.rs @@ -234,7 +234,9 @@ fn finalize_window_creation_attrs( #[cfg(target_os = "linux")] if let Some(x11_visual) = glutin::platform::x11::X11GlConfigExt::x11_visual(gl_config) { - return attributes.with_x_visual_id(Some(x11_visual.visual_id() as crate::windowing::window::XVisualID)); + return attributes.with_x_visual_id(Some( + x11_visual.visual_id() as crate::windowing::window::XVisualID + )); } attributes diff --git a/engine/src/scene.rs b/engine/src/scene.rs index 18a25d2..77c274c 100644 --- a/engine/src/scene.rs +++ b/engine/src/scene.rs @@ -1,5 +1,5 @@ -use crate::reflection::Reflection; use crate::ecs::Component; +use crate::reflection::Reflection; #[derive(Debug, Clone, Component, Reflection)] pub struct Scene; diff --git a/engine/src/windowing.rs b/engine/src/windowing.rs index 7038e06..cca8e9a 100644 --- a/engine/src/windowing.rs +++ b/engine/src/windowing.rs @@ -20,7 +20,6 @@ use winit::keyboard::PhysicalKey; use winit::monitor::MonitorHandle as WinitMonitorHandle; use winit::window::{Window as WinitWindow, WindowId as WinitWindowId}; -use crate::ecs::pair; use crate::ecs::actions::Actions; use crate::ecs::component::Component; use crate::ecs::entity::obtainer::Obtainer as EntityObtainer; @@ -30,7 +29,7 @@ use crate::ecs::phase::{Phase, PRE_UPDATE as PRE_UPDATE_PHASE}; use crate::ecs::sole::Single; use crate::ecs::system::observer::Observe; use crate::ecs::uid::Uid; -use crate::ecs::{declare_entity, Query, Sole}; +use crate::ecs::{declare_entity, pair, Query, Sole}; use crate::util::MapVec; use crate::vector::Vec2; use crate::windowing::dpi::{PhysicalPosition, PhysicalSize, Position}; @@ -512,7 +511,10 @@ impl Context }; }) { - tracing::error!("Failed to create windowing app thread: {:#}", crate::Error::new(err)); + tracing::error!( + "Failed to create windowing app thread: {:#}", + crate::Error::new(err) + ); return Self { shared_state, @@ -563,7 +565,10 @@ impl Context unreachable!(); }; - tracing::error!("Error in windowing app thread: {:#}", crate::Error::new(err)); + tracing::error!( + "Error in windowing app thread: {:#}", + crate::Error::new(err) + ); } else { tracing::error!("Windowing app initialization aborted unexpectedly"); } @@ -722,7 +727,10 @@ impl App ) { Ok(window) => window, Err(err) => { - tracing::error!("Failed to create window: {:#}", crate::Error::new(err)); + tracing::error!( + "Failed to create window: {:#}", + crate::Error::new(err) + ); continue; } }, |
