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
I struggled a bit understanding why this code doesn't work
#[test]
fn yet_another_test() {
let mut vec = vec![];
let a = html! { div { "foo" } };
vec.push(a);
let b = html! { div { "bar" } };
vec.push(b);
dbg!(&vec);
let f = html! { @for el in &vec { (el) } };
assert_eq!("<div>foo</div><div>bar</div>", f.into_string());
}
before realizing I had to Dereference el -> *el
Maybe it's possible to impl Render for borrowed values ?
The text was updated successfully, but these errors were encountered:
I think it would be possible to add an impl for &PreEscaped<T>.
But I don't think we can generalize beyond that. An impl for all &T will conflict with the existing blanket impl for T: Display, because Display is implemented for all &T already.
I think the ideal solution is to remove the blanket impl for T: Display. This is what markup.rs and sailfish do. But we'll need to check how much code that breaks.
I struggled a bit understanding why this code doesn't work
before realizing I had to Dereference el ->
*el
Maybe it's possible to impl Render for borrowed values ?
The text was updated successfully, but these errors were encountered: