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
+1 -3
View File
@@ -33,12 +33,10 @@ impl ForceClose {
}
if self.counting && self.timer.elapsed() >= INTERVAL {
self.reset();
} else {
if force_close_button_clicked && !self.current_frame {
} else if force_close_button_clicked && !self.current_frame {
activate(sysinfo);
self.reset();
}
}
self.finish_current_frame();
}
+7 -6
View File
@@ -36,9 +36,10 @@ pub enum BlockedStatus {
impl From<bool> for BlockedStatus {
fn from(value: bool) -> Self {
match value {
true => Self::Blocked,
false => Self::Unblocked,
if value {
Self::Blocked
} else {
Self::Unblocked
}
}
}
@@ -54,8 +55,8 @@ impl From<BlockedStatus> for eframe::egui::Color32 {
}
impl BlockedStatus {
pub fn to_color32(&self) -> eframe::egui::Color32 {
(*self).into()
pub fn to_color32(self) -> eframe::egui::Color32 {
self.into()
}
}
@@ -172,7 +173,7 @@ impl GameNetworking {
{
self.counting = false;
self.blocked_status = BlockedStatus::Unblocked;
};
}
}
}