clippy stuff

This commit is contained in:
2025-05-04 18:21:55 +01:00
parent 38c6402a12
commit b325ebb03c
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ impl ForceClose {
*self = Self::default(); *self = Self::default();
} }
fn finish_current_frame(&mut self) { const fn finish_current_frame(&mut self) {
if self.current_frame { if self.current_frame {
self.current_frame = false; self.current_frame = false;
} }
+1 -1
View File
@@ -37,7 +37,7 @@ impl App {
ui.horizontal(|ui| { ui.horizontal(|ui| {
ui.label("blocked_status"); ui.label("blocked_status");
egui::ComboBox::from_id_salt("blocked_status") egui::ComboBox::from_id_salt("blocked_status")
.selected_text(&self.game_networking.blocked_status.to_string()) .selected_text(self.game_networking.blocked_status.to_string())
.show_ui(ui, |ui| { .show_ui(ui, |ui| {
ui.build_menu(&mut self.game_networking.blocked_status); ui.build_menu(&mut self.game_networking.blocked_status);
}); });
+3 -2
View File
@@ -1,7 +1,8 @@
use std::{env, path::PathBuf, sync::LazyLock}; use std::{env, path::PathBuf, sync::LazyLock};
pub static APP_STORAGE_PATH: LazyLock<PathBuf> = pub static APP_STORAGE_PATH: LazyLock<PathBuf> = LazyLock::new(|| {
LazyLock::new(|| PathBuf::from(env::var("LOCALAPPDATA").unwrap()).join("GTA Tools")); PathBuf::from(env::var("LOCALAPPDATA").unwrap_or_else(|_| String::from("."))).join("GTA Tools")
});
pub mod game { pub mod game {
pub const EXE_ENHANCED: &str = "GTA5_Enhanced.exe"; pub const EXE_ENHANCED: &str = "GTA5_Enhanced.exe";