Simplify async code

- Update Cargo.lock
- Use new gtk-core API
- Remove unneeded async
- Remove unneeded clones

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/310>
This commit is contained in:
Julian Hofer 2023-11-22 09:12:07 +01:00
parent 8d185e1e10
commit cd8188a1bb
10 changed files with 26 additions and 40 deletions

View file

@ -29,8 +29,6 @@ use futures::future::{AbortHandle, Abortable};
use once_cell::sync::Lazy;
use std::cell::RefCell;
use crate::util::spawn;
use crate::image_metadata::LpImageMetadata;
use crate::widgets::image::LpImage;
@ -236,7 +234,7 @@ impl LpPropertiesView {
imp.info_handle.replace(Some(handle));
// ...then spawn the future.
spawn(async {
glib::spawn_future_local(async {
let _ = fut.await;
});
}