Fix blocking reqwest crash
This commit is contained in:
@@ -273,9 +273,11 @@ async fn main() {
|
||||
if !path::Path::exists(&download_path) {
|
||||
// println!("{:?}", download_path);
|
||||
println!("Downloading Town of Us... [{}]", ver_url.1.clone());
|
||||
let zip = reqwest::blocking::get(ver_url.1.clone())
|
||||
let zip = reqwest::get(ver_url.1.clone())
|
||||
.await
|
||||
.unwrap()
|
||||
.bytes()
|
||||
.await
|
||||
.unwrap();
|
||||
fs::write(download_path.clone(), zip).unwrap();
|
||||
}
|
||||
@@ -374,7 +376,10 @@ async fn main() {
|
||||
let main_window = WindowDesc::new(|| root_column)
|
||||
.title(title_string)
|
||||
.window_size((400.0, 400.0));
|
||||
AppLauncher::with_window(main_window).launch(1).unwrap();
|
||||
let app_launcher = AppLauncher::with_window(main_window);
|
||||
let external_handler = app_launcher.get_external_handle();
|
||||
app_launcher.launch(1).unwrap();
|
||||
// AppLauncher::with_window(main_window).launch(1).unwrap();
|
||||
|
||||
// let mut install_folder_path = installs_path.clone();
|
||||
// install_folder_path.push(version_smash);
|
||||
|
||||
Reference in New Issue
Block a user