diff --git a/serde_derive/src/internals/check.rs b/serde_derive/src/internals/check.rs index 870a1327..be922e0a 100644 --- a/serde_derive/src/internals/check.rs +++ b/serde_derive/src/internals/check.rs @@ -426,4 +426,4 @@ fn check_from_and_try_from(cx: &Ctxt, cont: &mut Container) { "#[serde(from = \"...\")] and #[serde(try_from = \"...\")] conflict with each other", ); } -} \ No newline at end of file +} diff --git a/test_suite/tests/test_annotations.rs b/test_suite/tests/test_annotations.rs index 67b611af..664e402c 100644 --- a/test_suite/tests/test_annotations.rs +++ b/test_suite/tests/test_annotations.rs @@ -4,8 +4,8 @@ use serde::de::{self, MapAccess, Unexpected, Visitor}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use std::collections::{BTreeMap, HashMap}; -use std::fmt; use std::convert::TryFrom; +use std::fmt; use std::marker::PhantomData; use serde_test::{ @@ -1616,7 +1616,10 @@ fn test_from_into_traits() { assert_ser_tokens::(&StructFromEnum(Some(5)), &[Token::None]); assert_ser_tokens::(&StructFromEnum(None), &[Token::None]); assert_de_tokens::(&StructFromEnum(Some(2)), &[Token::Some, Token::U32(2)]); - assert_de_tokens::(&StructTryFromEnum(Some(2)), &[Token::Some, Token::U32(2)]); + assert_de_tokens::( + &StructTryFromEnum(Some(2)), + &[Token::Some, Token::U32(2)], + ); assert_de_tokens_error::(&[Token::Some, Token::U32(5)], "out of range"); assert_de_tokens_error::(&[Token::None], "out of range"); }