listen to a few clippy lints

This commit is contained in:
2025-04-20 06:19:29 +01:00
parent 202554e03b
commit 935703e1ab
2 changed files with 10 additions and 11 deletions
+3 -5
View File
@@ -33,11 +33,9 @@ impl ForceClose {
} }
if self.counting && self.timer.elapsed() >= INTERVAL { if self.counting && self.timer.elapsed() >= INTERVAL {
self.reset(); self.reset();
} else { } else if force_close_button_clicked && !self.current_frame {
if force_close_button_clicked && !self.current_frame { activate(sysinfo);
activate(sysinfo); self.reset();
self.reset();
}
} }
self.finish_current_frame(); self.finish_current_frame();
} }
+7 -6
View File
@@ -36,9 +36,10 @@ pub enum BlockedStatus {
impl From<bool> for BlockedStatus { impl From<bool> for BlockedStatus {
fn from(value: bool) -> Self { fn from(value: bool) -> Self {
match value { if value {
true => Self::Blocked, Self::Blocked
false => Self::Unblocked, } else {
Self::Unblocked
} }
} }
} }
@@ -54,8 +55,8 @@ impl From<BlockedStatus> for eframe::egui::Color32 {
} }
impl BlockedStatus { impl BlockedStatus {
pub fn to_color32(&self) -> eframe::egui::Color32 { pub fn to_color32(self) -> eframe::egui::Color32 {
(*self).into() self.into()
} }
} }
@@ -172,7 +173,7 @@ impl GameNetworking {
{ {
self.counting = false; self.counting = false;
self.blocked_status = BlockedStatus::Unblocked; self.blocked_status = BlockedStatus::Unblocked;
}; }
} }
} }