Introduce pinned_async macro

This commit is contained in:
Reinout Meliesie 2025-02-18 18:31:05 +01:00
commit a3040e6735
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6
2 changed files with 16 additions and 3 deletions

View file

@ -48,9 +48,10 @@ fn show_window ( application : & Application ) {
let ui = UI :: new (
window ,
|film_uuid| Box :: pin ( async {
data_manager . get_film_details (film_uuid) . await . unwrap ()
} ) ,
|film_uuid| pinned_async ! {
data_manager . get_film_details (film_uuid) . await
. expect ("A film with the given UUID should exist")
} ,
) ;
window . show () ;