From eb7250792b7df81412d71103433dd8675cd18b6f Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 28 Dec 2018 12:19:32 -0500 Subject: [PATCH] Format with rustfmt 2018-12-10 --- serde_derive/src/ser.rs | 3 +-- test_suite/tests/test_macros.rs | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/serde_derive/src/ser.rs b/serde_derive/src/ser.rs index 4c1a0d6f..bbd83d66 100644 --- a/serde_derive/src/ser.rs +++ b/serde_derive/src/ser.rs @@ -319,8 +319,7 @@ fn serialize_struct_as_struct( .filter(|&field| !field.attrs.skip_serializing()) .peekable(); - let let_mut = mut_if(serialized_fields.peek().is_some() || - additional_field_count > 0); + let let_mut = mut_if(serialized_fields.peek().is_some() || additional_field_count > 0); let len = serialized_fields .map(|field| match field.attrs.skip_serializing_if() { diff --git a/test_suite/tests/test_macros.rs b/test_suite/tests/test_macros.rs index 3e6e3f1b..e034af68 100644 --- a/test_suite/tests/test_macros.rs +++ b/test_suite/tests/test_macros.rs @@ -1420,12 +1420,9 @@ fn test_internally_tagged_braced_struct_with_zero_fields() { struct S {} assert_tokens( - &S{ }, + &S {}, &[ - Token::Struct { - name: "S", - len: 1, - }, + Token::Struct { name: "S", len: 1 }, Token::Str("type"), Token::Str("S"), Token::StructEnd,