From 12860e94e2778ff31633b2f2c4a1613ec04e2606 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 13 Apr 2022 14:35:02 +0200 Subject: [PATCH] Derive `Default` for `Actions` I'm about to move it to a separate crate, which triggers the respective Clippy warning. --- fj-app/src/input/handler.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fj-app/src/input/handler.rs b/fj-app/src/input/handler.rs index 42eca7824..3e28f1795 100644 --- a/fj-app/src/input/handler.rs +++ b/fj-app/src/input/handler.rs @@ -133,6 +133,7 @@ impl Handler { } } +#[derive(Default)] pub struct Actions { pub exit: bool, @@ -143,12 +144,6 @@ pub struct Actions { impl Actions { pub fn new() -> Self { - Self { - exit: false, - - toggle_model: false, - toggle_mesh: false, - toggle_debug: false, - } + Self::default() } }