💄 优化代码
This commit is contained in:
@@ -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));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user