mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-15 12:44:31 +03:00
Merge pull request #1699 from UnHumbleBen/patch-1
Use idiomatic syntax of Rc::clone()
This commit is contained in:
commit
c7180ddc8d
@ -45,7 +45,7 @@ fn app(name: &str) {
|
|||||||
None => return,
|
None => return,
|
||||||
};
|
};
|
||||||
let controller = Controller::new(store, Rc::downgrade(&sched));
|
let controller = Controller::new(store, Rc::downgrade(&sched));
|
||||||
if let Some(mut view) = View::new(sched.clone()) {
|
if let Some(mut view) = View::new(Rc::clone(&sched)) {
|
||||||
let sch: &Rc<Scheduler> = &sched;
|
let sch: &Rc<Scheduler> = &sched;
|
||||||
view.init();
|
view.init();
|
||||||
sch.set_view(view);
|
sch.set_view(view);
|
||||||
|
Loading…
Reference in New Issue
Block a user