Skip to content

Commit

Permalink
fucking rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hamza1311 committed Aug 8, 2022
1 parent 9b418bf commit 5e8c4c4
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions packages/yew-macro/src/html_tree/html_element.rs
Expand Up @@ -269,16 +269,15 @@ impl ToTokens for HtmlElement {
.collect::<Vec<(LitStr, Value, bool)>>();
try_into_static(&attrs).unwrap_or_else(|| {
let keys = attrs.iter().map(|(k, _, _)| quote! { #k });
let values = attrs.iter()
.map(|(_, v, is_forced_attribute)| {
let apply_as = if *is_forced_attribute {
quote! { ::yew::virtual_dom::ApplyAttributeAs::Attribute }
} else {
quote! { ::yew::virtual_dom::ApplyAttributeAs::Property }
};
let value = wrap_attr_value(v);
quote! { ::std::option::Option::map(#value, |it| (it, #apply_as)) }
});
let values = attrs.iter().map(|(_, v, is_forced_attribute)| {
let apply_as = if *is_forced_attribute {
quote! { ::yew::virtual_dom::ApplyAttributeAs::Attribute }
} else {
quote! { ::yew::virtual_dom::ApplyAttributeAs::Property }
};
let value = wrap_attr_value(v);
quote! { ::std::option::Option::map(#value, |it| (it, #apply_as)) }
});
quote! {
::yew::virtual_dom::Attributes::Dynamic{
keys: &[#(#keys),*],
Expand Down

0 comments on commit 5e8c4c4

Please sign in to comment.