mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Implement simple clippy suggestions (#159)
This commit is contained in:
@@ -14,7 +14,7 @@ impl From<OriginGame> for ShortcutOwned {
|
||||
fn from(game: OriginGame) -> Self {
|
||||
let launch = match game.origin_compat_folder{
|
||||
Some(compat_folder) =>
|
||||
format!("STEAM_COMPAT_DATA_PATH=\"{}\" %command% \"origin2://game/launch?offerIds={}&autoDownload=1&authCode=&cmdParams=\"", compat_folder.to_string_lossy().to_string(), game.id)
|
||||
format!("STEAM_COMPAT_DATA_PATH=\"{}\" %command% \"origin2://game/launch?offerIds={}&autoDownload=1&authCode=&cmdParams=\"", compat_folder.to_string_lossy(), game.id)
|
||||
,
|
||||
None => format!(
|
||||
"\"origin2://game/launch?offerIds={}&autoDownload=1&authCode=&cmdParams=\"",
|
||||
|
||||
@@ -174,10 +174,11 @@ fn get_default_locations() -> Option<OriginPathData> {
|
||||
return None;
|
||||
}
|
||||
let exe_path = get_exe_path();
|
||||
if exe_path.is_none() {
|
||||
return None;
|
||||
} else {
|
||||
res.exe_path = exe_path.unwrap();
|
||||
match exe_path {
|
||||
Some(exe_path) => {
|
||||
res.exe_path = exe_path;
|
||||
}
|
||||
None => return None,
|
||||
}
|
||||
}
|
||||
Some(res)
|
||||
@@ -194,7 +195,7 @@ fn get_exe_path() -> Option<PathBuf> {
|
||||
let launcher_string: Result<String, _> = launcher_key.get_value("");
|
||||
if let Ok(launcher_string) = launcher_string {
|
||||
let path = Path::new(&launcher_string[1..launcher_string.len() - 6]);
|
||||
println!("{:?}",path);
|
||||
println!("{:?}", path);
|
||||
if path.exists() {
|
||||
return Some(path.to_path_buf());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user