@@ -311,7 +311,10 @@ mod tests {
311311 #[ wasm_bindgen_test]
312312 fn test_add_new_field ( ) {
313313 let el = create_elem_with_style ( "color: red;" ) ;
314- let attr = CssAttribute { field : "background-color" , value : Some ( "blue" ) } ;
314+ let attr = CssAttribute {
315+ field : "background-color" ,
316+ value : Some ( "blue" ) ,
317+ } ;
315318 update_css_field ( attr, & el) . unwrap ( ) ;
316319 let got = el. get_attribute ( "style" ) . unwrap ( ) ;
317320 assert ! ( got. contains( "color: red;" ) ) ;
@@ -321,15 +324,21 @@ mod tests {
321324 #[ wasm_bindgen_test]
322325 fn test_update_existing_field ( ) {
323326 let el = create_elem_with_style ( "color: red;" ) ;
324- let attr = CssAttribute { field : "color" , value : Some ( "green" ) } ;
327+ let attr = CssAttribute {
328+ field : "color" ,
329+ value : Some ( "green" ) ,
330+ } ;
325331 update_css_field ( attr, & el) . unwrap ( ) ;
326332 assert_eq ! ( el. get_attribute( "style" ) . unwrap( ) , "color: green;" ) ;
327333 }
328334
329335 #[ wasm_bindgen_test]
330336 fn test_remove_field ( ) {
331337 let el = create_elem_with_style ( "color: red; background-color: blue;" ) ;
332- let attr = CssAttribute { field : "color" , value : None } ;
338+ let attr = CssAttribute {
339+ field : "color" ,
340+ value : None ,
341+ } ;
333342 update_css_field ( attr, & el) . unwrap ( ) ;
334343 let got = el. get_attribute ( "style" ) . unwrap ( ) ;
335344 assert_eq ! ( got, "background-color: blue;" ) ;
@@ -338,7 +347,10 @@ mod tests {
338347 #[ wasm_bindgen_test]
339348 fn test_remove_last_field_removes_attribute ( ) {
340349 let el = create_elem_with_style ( "color: red;" ) ;
341- let attr = CssAttribute { field : "color" , value : None } ;
350+ let attr = CssAttribute {
351+ field : "color" ,
352+ value : None ,
353+ } ;
342354 update_css_field ( attr, & el) . unwrap ( ) ;
343355 assert ! ( el. get_attribute( "style" ) . is_none( ) ) ;
344356 }
0 commit comments