Skip to content

Commit

Permalink
core: Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronErhardt committed Apr 2, 2023
1 parent 399027d commit 0a53e14
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions examples/typed_list_view_async.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::time::Duration;

use gtk::{prelude::*, glib};
use gtk::{glib, prelude::*};
use relm4::{
binding::{Binding, U8Binding},
prelude::*,
Expand All @@ -11,7 +11,7 @@ use relm4::{
struct MyListItem {
value: u8,
binding: U8Binding,
handle: Option<glib::JoinHandle<()>>
handle: Option<glib::JoinHandle<()>>,
}

impl PartialEq for MyListItem {
Expand Down Expand Up @@ -104,7 +104,12 @@ impl RelmListItem for MyListItem {
}

fn unbind(&mut self, _widgets: &mut Self::Widgets, _root: &mut Self::Root) {
self.handle.take().unwrap().into_source_id().unwrap().remove();
self.handle
.take()
.unwrap()
.into_source_id()
.unwrap()
.remove();
*self.binding.guard() = 0;
}
}
Expand Down

0 comments on commit 0a53e14

Please sign in to comment.