fix windows formatting

This commit is contained in:
Piotr Siuszko 2022-09-26 18:32:25 +02:00
parent eb79e560dc
commit 365c724252
3 changed files with 30 additions and 22 deletions

View File

@ -36,7 +36,11 @@ impl Configuration {
#[cfg(unix)]
let uninstall_exists = true; // just check that on windows only
let unity_exe_exists = entry.path().clone().join(consts::UNITY_EXE_NAME).exists();
println!("PATH {} {:?}", unity_exe_exists, &entry.path().clone().join(consts::UNITY_EXE_NAME));
println!(
"PATH {} {:?}",
unity_exe_exists,
&entry.path().clone().join(consts::UNITY_EXE_NAME)
);
uninstall_exists && unity_exe_exists
}

View File

@ -1,4 +1,3 @@
use std::borrow::Borrow;
use std::collections::HashMap;
use std::path::Path;
@ -47,9 +46,15 @@ impl UnityEditor {
version = Some(short.to_string());
}
}
}}
}
}
if version.is_none() {
let folder = base_path.to_str().expect("Fail").split(consts::SLASH).last().unwrap();
let folder = base_path
.to_str()
.expect("Fail")
.split(consts::SLASH)
.last()
.unwrap();
version = Some(folder.to_string());
}
@ -62,7 +67,6 @@ impl UnityEditor {
base_path: String::from(path),
platforms: UnityEditor::get_platforms(path),
})
}
fn get_platforms(unity_folder: &str) -> Vec<String> {