From 556e6881d1783666ebf774145839e60cb673c7f9 Mon Sep 17 00:00:00 2001 From: talwat <83217276+talwat@users.noreply.github.com> Date: Sun, 7 Dec 2025 23:11:38 +0100 Subject: [PATCH] style: reorder imports --- Cargo.toml | 1 + src/ui.rs | 4 +++- src/ui/interface.rs | 6 ++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index aa24bdb..2b07bc8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,3 +79,4 @@ must_use_candidate = "allow" cast_precision_loss = "allow" cast_sign_loss = "allow" cast_possible_truncation = "allow" +struct_excessive_bools = "allow" diff --git a/src/ui.rs b/src/ui.rs index 98b6235..1520e68 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -182,7 +182,9 @@ impl Handle { } } - clock.as_mut().map(|x| x.update(&mut window)); + if let Some(x) = clock.as_mut() { + x.update(&mut window) + } interface::draw(&mut state, &mut window, params)?; interval.tick().await; } diff --git a/src/ui/interface.rs b/src/ui/interface.rs index 705087a..80b0e97 100644 --- a/src/ui/interface.rs +++ b/src/ui/interface.rs @@ -1,11 +1,9 @@ -use std::{env, time::Duration}; - -use tokio::time::Instant; - use crate::{ ui::{self, components, window::Window}, Args, }; +use std::{env, time::Duration}; +use tokio::time::Instant; /// An extremely simple clock to be used alongside the [`Window`]. pub struct Clock(Instant);