diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..1927e4f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + files: "\\.rs$" + - id: end-of-file-fixer + files: "\\.rs$" + - id: mixed-line-ending + args: [--fix=lf] + files: "\\.rs$" diff --git a/core/src/lib.rs b/core/src/lib.rs index ee279f9..f4b8d0c 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -1,4 +1,4 @@ pub mod engine; pub mod scene; pub mod debug_ui; -pub use debug_ui::*; \ No newline at end of file +pub use debug_ui::*; diff --git a/engine/src/engine.rs b/engine/src/engine.rs index 38b6657..5d6af36 100644 --- a/engine/src/engine.rs +++ b/engine/src/engine.rs @@ -79,7 +79,7 @@ impl EngineTrait for Engine { self.scene_manager.current_mut() } - fn get_debug_ui_buffer(&self) -> Rc> { + fn get_debug_ui_buffer(&self) -> Rc> { self.debug_ui_buffer.clone() } diff --git a/engine/src/lib.rs b/engine/src/lib.rs index e17307d..b3a2dc8 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -1,4 +1,4 @@ pub mod engine; pub mod system; -pub use crate::engine::Engine; \ No newline at end of file +pub use crate::engine::Engine; diff --git a/glium_platform/src/platform.rs b/glium_platform/src/platform.rs index 97a94a1..97c1535 100644 --- a/glium_platform/src/platform.rs +++ b/glium_platform/src/platform.rs @@ -66,7 +66,7 @@ impl> Platform for GliumPlatfor .systems .values_mut() .for_each(|system| system.handle_event(&mut self.window, event.clone())); - + let mut ctx2 = ctx.clone(); ctx2.current_event = event.clone(); self.engine.handle_event(ctx2); diff --git a/glium_platform/src/render/mod.rs b/glium_platform/src/render/mod.rs index e98554f..c31a0d9 100644 --- a/glium_platform/src/render/mod.rs +++ b/glium_platform/src/render/mod.rs @@ -1,4 +1,4 @@ mod basic; pub mod debug_ui; -pub use basic::BasicMeshRenderingSystem; \ No newline at end of file +pub use basic::BasicMeshRenderingSystem; diff --git a/platform/src/context.rs b/platform/src/context.rs index fb5ec65..45e8fa4 100644 --- a/platform/src/context.rs +++ b/platform/src/context.rs @@ -7,4 +7,4 @@ pub struct PlatformContext { pub asset_manager: ModelManagerRef, pub frame_width: f32, pub frame_height: f32, -} \ No newline at end of file +} diff --git a/platform/src/event.rs b/platform/src/event.rs index 82ce8b6..bb27077 100644 --- a/platform/src/event.rs +++ b/platform/src/event.rs @@ -4,7 +4,7 @@ pub enum PlatformEvent { /// The platform has requested to close the app. CloseRequested, - + /// Platform event loop is about to block and wait for new /// new events. AboutToWait