Rename WeakPin -> PinWeak

This commit is contained in:
Olivier Goffart 2020-07-31 18:19:26 +02:00
parent 75671c18e7
commit cb67e40c32
5 changed files with 27 additions and 27 deletions

View file

@ -4,13 +4,13 @@ sixtyfps::include_modules!();
fn main() {
let app = Hello::new();
let app_weak = sixtyfps::re_exports::WeakPin::downgrade(app.clone());
let app_weak = sixtyfps::re_exports::PinWeak::downgrade(app.clone());
app.plus_clicked.set_handler(move |()| {
let app = app_weak.upgrade().unwrap();
let counter = Hello::field_offsets().counter.apply_pin(app.as_ref());
counter.set(counter.get() + 1);
});
let app_weak = sixtyfps::re_exports::WeakPin::downgrade(app.clone());
let app_weak = sixtyfps::re_exports::PinWeak::downgrade(app.clone());
app.minus_clicked.set_handler(move |()| {
let app = app_weak.upgrade().unwrap();
let counter = Hello::field_offsets().counter.apply_pin(app.as_ref());