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:
parent
6385658169
commit
5956aa6460
6 changed files with 13 additions and 16 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue