fix formatting

This commit is contained in:
Evan Almloff committed 2023-03-19 20:47:16 -05:00
1 parent 209a55da69
commit 03413a68ab
3 files changed
+7 -7

No files matched your search

-2
View File
@@ -1,5 +1,3 @@
use dioxus::prelude::*; use dioxus::prelude::*;
fn main() { fn main() {
+6 -4
View File
@@ -233,7 +233,11 @@ impl Parse for ElementName {
if raw.len() == 1 { if raw.len() == 1 {
Ok(ElementName::Ident(raw.into_iter().next().unwrap())) Ok(ElementName::Ident(raw.into_iter().next().unwrap()))
} else { } else {
let tag = raw.into_iter().map(|ident| ident.to_string()).collect::<Vec<_>>().join("-"); let tag = raw
.into_iter()
.map(|ident| ident.to_string())
.collect::<Vec<_>>()
.join("-");
Ok(ElementName::Custom(tag)) Ok(ElementName::Custom(tag))
} }
} }
@@ -315,9 +319,7 @@ impl ToTokens for ElementAttrNamed {
} }
}; };
let attribute= let attribute = match attr {
match attr {
ElementAttr::AttrText { name, value } => { ElementAttr::AttrText { name, value } => {
let ns = ns(name); let ns = ns(name);
let volitile = volitile(name); let volitile = volitile(name);
+1 -1
View File
@@ -439,7 +439,7 @@ impl<'a> DynamicContext<'a> {
ElementName::Custom(_) => { ElementName::Custom(_) => {
let as_string = name.to_string(); let as_string = name.to_string();
quote! { #as_string } quote! { #as_string }
}, }
}; };
quote! { quote! {
::dioxus::core::TemplateAttribute::Static { ::dioxus::core::TemplateAttribute::Static {