work
This commit is contained in:
@@ -12,7 +12,7 @@ fn main() {
|
||||
#[derive(DefaultUiState)]
|
||||
pub struct Client {
|
||||
ui_state: DefaultUiState,
|
||||
info: WidgetRef<Text>,
|
||||
info: WeakWidget<Text>,
|
||||
}
|
||||
|
||||
impl DefaultAppState for Client {
|
||||
@@ -147,7 +147,7 @@ impl DefaultAppState for Client {
|
||||
let main = WidgetPtr::new().add(rsc);
|
||||
|
||||
let vals = Rc::new(RefCell::new((0, Vec::new())));
|
||||
let mut switch_button = |color, to: WidgetRef, label| {
|
||||
let mut switch_button = |color, to: WeakWidget, label| {
|
||||
let to = to.upgrade(rsc);
|
||||
let vec = &mut vals.borrow_mut().1;
|
||||
let i = vec.len();
|
||||
|
||||
Reference in New Issue
Block a user