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

@ -85,7 +85,7 @@ impl UpdateSender {
F: std::future::Future<Output = Result<(), glycin::Error>> + Send + 'static,
{
let update_sender = self.clone();
glib::MainContext::default().spawn(async move {
glib::spawn_future(async move {
let update_sender = update_sender.clone();
let result: Result<(), glycin::Error> = f.await;