Merge pull request #1699 from UnHumbleBen/patch-1

Use idiomatic syntax of Rc::clone()
This commit is contained in:
Alex Crichton 2019-08-05 10:07:12 -05:00 committed by GitHub
commit c7180ddc8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ fn app(name: &str) {
None => return,
};
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;
view.init();
sch.set_view(view);