diff --git a/packages/core/src/nodes.rs b/packages/core/src/nodes.rs index f30fdbcf3..dc9c85fb1 100644 --- a/packages/core/src/nodes.rs +++ b/packages/core/src/nodes.rs @@ -807,7 +807,7 @@ impl<'a, 'b> IntoDynNode<'b> for &'a str { impl IntoDynNode<'_> for &String { fn into_dyn_node(self, cx: &ScopeState) -> DynamicNode { DynamicNode::Text(VText { - value: cx.bump().alloc_str(&self), + value: cx.bump().alloc_str(self), id: Default::default(), }) } @@ -909,7 +909,7 @@ impl<'a> IntoAttributeValue<'a> for String { impl<'a> IntoAttributeValue<'a> for &String { fn into_value(self, cx: &'a Bump) -> AttributeValue<'a> { - AttributeValue::Text(cx.alloc_str(&self)) + AttributeValue::Text(cx.alloc_str(self)) } } diff --git a/packages/rsx/src/element.rs b/packages/rsx/src/element.rs index b3fb3cf4f..7d7a9a3c8 100644 --- a/packages/rsx/src/element.rs +++ b/packages/rsx/src/element.rs @@ -142,14 +142,12 @@ impl Parse for Element { if name == "children" { return Err(syn::Error::new( name.span(), - format!( - r#"Shorthand element children are not supported. + r#"Shorthand element children are not supported. To pass children into elements, wrap them in curly braces. Like so: div {{ {{children}} }} "#, - ), )); };