From 02afe68342870ce4f37d7e8fb45c985397d6e08d Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 23 May 2026 19:46:46 +0200 Subject: refactor(engine): use Rust edition 2021 This change is because of a rustfmt bug in the 2024 edition. For example, the following code snippet: ``` struct Value {} struct ParsingError {} trait Keyword {} impl Value { fn parse(value: &str, line_no: usize) -> Result { todo!(); } } ``` when formatted with `rustfmt --edition 2021 --emit stdout --config max_width=90,brace_style=AlwaysNextLine` becomes: ``` struct Value {} struct ParsingError {} trait Keyword {} impl Value { fn parse(value: &str, line_no: usize) -> Result { todo!(); } } ``` --- engine/src/windowing/mouse.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engine/src/windowing') diff --git a/engine/src/windowing/mouse.rs b/engine/src/windowing/mouse.rs index 2a3324e..f4969ea 100644 --- a/engine/src/windowing/mouse.rs +++ b/engine/src/windowing/mouse.rs @@ -1,7 +1,6 @@ use std::collections::HashMap; use crate::ecs::Sole; - use crate::vector::Vec2; #[derive(Debug, Default, Clone, Sole)] @@ -48,7 +47,7 @@ impl Buttons /// Returns a iterator that yields buttons and their current states. Only buttons with /// states is included. - pub fn all_current(&self) -> impl Iterator + pub fn all_current(&self) -> impl Iterator + use<'_> { self.map .iter() -- cgit v1.2.3-18-g5258