code: clone macro: Use convenience attributes instead of upgrade_or_else

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/412>
This commit is contained in:
Fina Wilke 2024-06-23 22:28:16 +02:00 • committed by Sophie Herold
parent 6385658169
commit 5956aa6460
6 changed files with 13 additions and 16 deletions

View file

@ -120,8 +120,8 @@ impl imp::LpImage {
let callback_id = obj.add_tick_callback(glib::clone!(
#[weak(rename_to = obj)]
self,
#[upgrade_or_else]
|| glib::ControlFlow::Break,
#[upgrade_or]
glib::ControlFlow::Break,
move |_, clock| obj.tick_callback(clock)
));
self.tick_callback.replace(Some(callback_id));