Merge remote-tracking branch 'upstream/master' into fix-non-str-attributes

This commit is contained in:
= committed 2022-12-11 21:26:38 -06:00
commit 73ec4abfdf
33 files changed
+1628 -40

No files matched your search

+6 -2
View File
@@ -1,8 +1,13 @@
[package]
name = "dioxus-rsx"
version = "0.0.0"
version = "0.0.1"
edition = "2018"
license = "MIT/Apache-2.0"
description = "Core functionality for Dioxus - a concurrent renderer-agnostic Virtual DOM for interactive user experiences"
repository = "https://github.com/DioxusLabs/dioxus/"
homepage = "https://dioxuslabs.com"
documentation = "https://docs.rs/dioxus-rsx"
keywords = ["dom", "ui", "gui", "react", "wasm"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -10,5 +15,4 @@ license = "MIT/Apache-2.0"
proc-macro2 = { version = "1.0", features = ["span-locations"] }
syn = { version = "1.0", features = ["full", "extra-traits"] }
quote = { version = "1.0" }
dioxus-core = { path = "../core", features = ["serialize"] }
serde = { version = "1.0", features = ["derive"] }
+3 -3
View File
@@ -182,7 +182,7 @@ impl<'a> DynamicContext<'a> {
let static_attrs = el.attributes.iter().map(|attr| match &attr.attr {
ElementAttr::AttrText { name, value } if value.is_static() => {
let value = value.source.as_ref().unwrap();
let value = value.to_static().unwrap();
quote! {
::dioxus::core::TemplateAttribute::Static {
name: dioxus_elements::#el_name::#name.0,
@@ -196,7 +196,7 @@ impl<'a> DynamicContext<'a> {
}
ElementAttr::CustomAttrText { name, value } if value.is_static() => {
let value = value.source.as_ref().unwrap();
let value = value.to_static().unwrap();
quote! {
::dioxus::core::TemplateAttribute::Static {
name: #name,
@@ -244,7 +244,7 @@ impl<'a> DynamicContext<'a> {
}
BodyNode::Text(text) if text.is_static() => {
let text = text.source.as_ref().unwrap();
let text = text.to_static().unwrap();
quote! { ::dioxus::core::TemplateNode::Text{ text: #text } }
}