Skip to content

Commit

Permalink
Lint Backend fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealIndianBoi committed Dec 27, 2024
1 parent 189f8e3 commit 1f2c02d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src-tauri/src/commands/binaries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use tauri::{Emitter, Manager};
use crate::{
config::LauncherConfig,
util::{
file::{overwrite_dir},
file::overwrite_dir,
process::{create_log_file, create_std_log_file, watch_process},
},
TAURI_APP,
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::Path;
use crate::{config::LauncherConfig, util::file::delete_dir};
use semver::Version;
use std::path::Path;
use sysinfo::Disks;
use tauri::{Emitter, Manager};

Expand Down
10 changes: 8 additions & 2 deletions src-tauri/src/commands/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ pub async fn uninstall_game(
}

#[tauri::command]
pub async fn reset_game_settings(app_handle: tauri::AppHandle, game_name: String) -> Result<(), CommandError> {
pub async fn reset_game_settings(
app_handle: tauri::AppHandle,
game_name: String,
) -> Result<(), CommandError> {
let config_dir = match app_handle.path().config_dir() {
Ok(path) => path,
Err(_) => {
Expand Down Expand Up @@ -170,7 +173,10 @@ fn get_saves_highest_milestone(
//
// Otherwise, it will default to a default picture (geyser)
#[tauri::command]
pub async fn get_furthest_game_milestone(app_handle: tauri:: AppHandle, game_name: String) -> Result<String, CommandError> {
pub async fn get_furthest_game_milestone(
app_handle: tauri::AppHandle,
game_name: String,
) -> Result<String, CommandError> {
// TODO - currently only checking Jak 1
// TODO - It would be cool if the launcher had save-game editing features and the like
// Scan each save file, we inspect the `game-save`'s tag list.
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use std::{
path::Path,
};
use sysinfo::{Disks, System};
use tauri::Manager;
use tempfile::NamedTempFile;
use walkdir::WalkDir;
use zip::write::SimpleFileOptions;
use tauri::Manager;

use crate::{
config::LauncherConfig,
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/util/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rustc_serialize::base64::{ToBase64, MIME};
use rustc_serialize::hex::ToHex;
use std::{
fs::File,
io::{Read},
io::Read,
path::{Path, PathBuf},
};

Expand Down
10 changes: 4 additions & 6 deletions src-tauri/src/util/game_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ use std::{
process::Command,
};

use crate::{commands::CommandError, config::LauncherConfig, util::file::create_dir};
use semver::Version;
use serde::{Deserialize, Serialize};
use tauri::Manager;
use crate::{commands::CommandError, config::LauncherConfig, util::file::create_dir};

// TODO - duplicate code, cleanup later

Expand Down Expand Up @@ -181,10 +181,8 @@ pub async fn run_game_gpu_test(
))
}
}
None => {
Err(CommandError::BinaryExecution(
"GPU test failed, no exit-code returned".to_owned(),
))
}
None => Err(CommandError::BinaryExecution(
"GPU test failed, no exit-code returned".to_owned(),
)),
}
}

0 comments on commit 1f2c02d

Please sign in to comment.