Format with rustfmt 2019-06-09

This commit is contained in:
David Tolnay 2019-07-17 12:27:26 -07:00
parent f249e72162
commit cf70c3fb05
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 6 additions and 3 deletions

View File

@ -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>(&StructFromEnum(Some(5)), &[Token::None]);
assert_ser_tokens::<StructFromEnum>(&StructFromEnum(None), &[Token::None]);
assert_de_tokens::<StructFromEnum>(&StructFromEnum(Some(2)), &[Token::Some, Token::U32(2)]);
assert_de_tokens::<StructTryFromEnum>(&StructTryFromEnum(Some(2)), &[Token::Some, Token::U32(2)]);
assert_de_tokens::<StructTryFromEnum>(
&StructTryFromEnum(Some(2)),
&[Token::Some, Token::U32(2)],
);
assert_de_tokens_error::<StructTryFromEnum>(&[Token::Some, Token::U32(5)], "out of range");
assert_de_tokens_error::<StructTryFromEnum>(&[Token::None], "out of range");
}