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);