From 5e8c4c4541aa01925d25f7582161498e292a4f62 Mon Sep 17 00:00:00 2001 From: Muhammad Hamza Date: Tue, 9 Aug 2022 00:00:07 +0500 Subject: [PATCH] fucking rustfmt --- .../yew-macro/src/html_tree/html_element.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/yew-macro/src/html_tree/html_element.rs b/packages/yew-macro/src/html_tree/html_element.rs index 5cb4fb106d1..a15339866a5 100644 --- a/packages/yew-macro/src/html_tree/html_element.rs +++ b/packages/yew-macro/src/html_tree/html_element.rs @@ -269,16 +269,15 @@ impl ToTokens for HtmlElement { .collect::>(); 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),*],