💄 优化代码

This commit is contained in:
Tw93
2023-01-14 00:08:54 +08:00
parent d18389e361
commit 17cc904761

View File

@@ -154,16 +154,15 @@ fn main() -> wry::Result<()> {
*default_path = path.clone(); *default_path = path.clone();
let submitted = proxy let submitted = proxy
.send_event(UserEvent::DownloadStarted( .send_event(UserEvent::DownloadStarted(
uri.clone(), uri,
path.display().to_string(), path.display().to_string(),
)) ))
.is_ok(); .is_ok();
return submitted; submitted
} }
}; };
let download_completed = { let download_completed = {
let proxy = proxy.clone();
move |_uri, path, success| { move |_uri, path, success| {
let _ = proxy.send_event(UserEvent::DownloadComplete(path, success)); let _ = proxy.send_event(UserEvent::DownloadComplete(path, success));
} }