Lint & Prettier

This commit is contained in:
Thoronium 2024-10-30 13:32:09 -06:00
parent f6f5eae31c
commit 989487b381
4 changed files with 38 additions and 40 deletions

View File

@ -115,7 +115,7 @@ async fn parse_args(inp: &Vec<String>) -> Result<Args, ArgsError> {
if args.value_of("launch-game")? {
let game_path = config.game_install_path;
let game_args: String = args.value_of("game-args").unwrap_or(String::new());
let game_args: String = args.value_of("game-args").unwrap_or_default();
if game_path.is_some() {
if args.value_of("non-elevated-game")? {

View File

@ -160,11 +160,7 @@ pub async fn patch_game(newer_game: bool, version: String) -> bool {
String::from("Astrolabe.dll"),
);
if replaced50 {
return true;
} else {
return false;
}
return replaced50;
}
// Copy the patch to game files

View File

@ -463,8 +463,10 @@ pub fn wipe_registry(exec_name: String) {
Err(e) => println!("Error wiping registry: {}", e),
}
let hsr_settings =
match Hive::CurrentUser.open(format!("Software\\Cognosphere\\Star Rail"), Security::Write) {
let hsr_settings = match Hive::CurrentUser.open(
"Software\\Cognosphere\\Star Rail".to_string(),
Security::Write,
) {
Ok(s) => s,
Err(e) => {
println!("Error getting registry setting: {}", e);