You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xilem_core: implement View for Rc<impl View> (#732)
I needed this in xilem_web, I could've used `Arc` as well, but I think
it's fine to add this for consistency when an `Arc` is not needed.
It's basically copy-pasta of the `Arc`. (I don't think a macro is worth
it here?). Had to fix some resulting issues in the `Templated` view (due
to ambiguity?).
---------
Co-authored-by: Daniel McNab <[email protected]>
Copy file name to clipboardExpand all lines: xilem_web/src/templated.rs
+14-35Lines changed: 14 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -5,35 +5,29 @@ use crate::{
5
5
core::{MessageResult,Mut,View,ViewId,ViewMarker},
6
6
DomView,DynMessage,PodMut,ViewCtx,
7
7
};
8
-
use std::{any::TypeId,ops::Derefas _,rc::Rc};
8
+
use std::{any::TypeId, rc::Rc};
9
9
use wasm_bindgen::UnwrapThrowExt;
10
10
11
11
/// This view creates an internally cached deep-clone of the underlying DOM node. When the inner view is created again, this will be done more efficiently.
12
-
pubstructTemplated<E>(Rc<E>);
12
+
pubstructTemplated<V>(Rc<V>);
13
13
14
-
#[allow(unnameable_types)]// reason: Implementation detail, public because of trait visibility rules
0 commit comments