diff --git a/packages/yew-macro/src/props/prop_macro.rs b/packages/yew-macro/src/props/prop_macro.rs index 06ca2a74512..95f57727cc0 100644 --- a/packages/yew-macro/src/props/prop_macro.rs +++ b/packages/yew-macro/src/props/prop_macro.rs @@ -8,7 +8,7 @@ use syn::spanned::Spanned; use syn::token::Brace; use syn::{Expr, Token, TypePath}; -use super::{ComponentProps, Prop, Props, PropList}; +use super::{ComponentProps, Prop, PropList, Props}; use crate::html_tree::HtmlDashedName; /// Pop from `Punctuated` without leaving it in a state where it has trailing punctuation. diff --git a/packages/yew-macro/tests/props_macro_test.rs b/packages/yew-macro/tests/props_macro_test.rs index 335bd2ea77a..47b96990d19 100644 --- a/packages/yew-macro/tests/props_macro_test.rs +++ b/packages/yew-macro/tests/props_macro_test.rs @@ -9,10 +9,18 @@ fn props_macro() { #[test] fn props_order() { #[derive(yew::Properties, PartialEq)] - struct Props { first: usize, second: usize, last: usize } + struct Props { + first: usize, + second: usize, + last: usize, + } let mut g = 1..=3; - let props = yew::props!(Props { first: g.next().unwrap(), second: g.next().unwrap(), last: g.next().unwrap() }); + let props = yew::props!(Props { + first: g.next().unwrap(), + second: g.next().unwrap(), + last: g.next().unwrap() + }); assert_eq!(props.first, 1); assert_eq!(props.second, 2);