@@ -55,7 +55,7 @@ pub(crate) struct VdomInnerExclusive {
55 // Always `Some` except just before we drop. Just an option so that
55 // Always `Some` except just before we drop. Just an option so that
56 // `unmount` can take the component out but we can still have a Drop
56 // `unmount` can take the component out but we can still have a Drop
57 // implementation.
57 // implementation.
58− component: Option<Box<RootRender>>,
58+ component: Option<Box<dyn RootRender>>,
60 dom_buffers: Option<[Bump; 2]>,
60 dom_buffers: Option<[Bump; 2]>,
61 change_list: ManuallyDrop<ChangeListPersistentState>,
61 change_list: ManuallyDrop<ChangeListPersistentState>,
@@ -158,12 +158,15 @@ impl Vdom {
159 R: RootRender,
159 R: RootRender,
161− Self::with_boxed_root_render(container, Box::new(component) as Box<RootRender>)
161+ Self::with_boxed_root_render(container, Box::new(component) as Box<dyn RootRender>)
164 /// Construct a `Vdom` with the already-boxed-as-a-trait-object root
164 /// Construct a `Vdom` with the already-boxed-as-a-trait-object root
165 /// rendering component.
165 /// rendering component.
166− pub fn with_boxed_root_render(container: &crate::Element, component: Box<RootRender>) -> Vdom {
166+ pub fn with_boxed_root_render(
167+ container: &crate::Element,
168+ component: Box<dyn RootRender>,
167 crate::strace::init_strace();
170 crate::strace::init_strace();
169 let dom_buffers = [Bump::new(), Bump::new()];
172 let dom_buffers = [Bump::new(), Bump::new()];
@@ -217,7 +220,7 @@ impl Vdom {
217 R: RootRender,
220 R: RootRender,
219 let mut exclusive = self.inner.exclusive.borrow_mut();
222 let mut exclusive = self.inner.exclusive.borrow_mut();
220− let component = Box::new(component) as Box<RootRender>;
223+ let component = Box::new(component) as Box<dyn RootRender>;
221 exclusive.component = Some(component);
224 exclusive.component = Some(component);
222 exclusive.render();
225 exclusive.render();
@@ -237,7 +240,7 @@ impl Vdom {
237 /// Unmount this virtual DOM, unregister its event listeners, and return its
240 /// Unmount this virtual DOM, unregister its event listeners, and return its
238 /// root render component.
241 /// root render component.
239 #[inline]
242 #[inline]
240− pub fn unmount(self) -> Box<RootRender> {
243+ pub fn unmount(self) -> Box<dyn RootRender> {
241 Rc::try_unwrap(self.inner.clone())
244 Rc::try_unwrap(self.inner.clone())
242 .map_err(|_| ())
245 .map_err(|_| ())
243 .unwrap_throw()
246 .unwrap_throw()
@@ -323,7 +326,7 @@ impl VdomInnerExclusive {
326−fn request_animation_frame(f: &Closure<FnMut()>) {
329+fn request_animation_frame(f: &Closure<dyn FnMut()>) {
327 web_sys::window()
330 web_sys::window()
328 .expect_throw("should have a window")
331 .expect_throw("should have a window")
329 .request_animation_frame(f.as_ref().unchecked_ref())
332 .request_animation_frame(f.as_ref().unchecked_ref())
@@ -340,7 +343,7 @@ where
340 let f = Closure::wrap(Box::new(move || {
343 let f = Closure::wrap(Box::new(move || {
341 *g.borrow_mut() = None;
344 *g.borrow_mut() = None;
343− }) as Box<FnMut()>);
346+ }) as Box<dyn FnMut()>);
344 request_animation_frame(&f);
347 request_animation_frame(&f);
346 *h.borrow_mut() = Some(f);
349 *h.borrow_mut() = Some(f);