Format with rustfmt 2018-12-10

This commit is contained in:
David Tolnay
2018-12-27 19:49:08 -05:00
parent 807a097387
commit 32728d2f1d
6 changed files with 22 additions and 23 deletions
+2 -2
View File
@@ -1379,13 +1379,13 @@ fn test_enum_in_internally_tagged_enum() {
#[test]
fn test_internally_tagged_struct() {
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag="type")]
#[serde(tag = "type")]
pub struct Struct {
a: u8,
}
assert_tokens(
&Struct{ a: 1 },
&Struct { a: 1 },
&[
Token::Struct {
name: "Struct",
@@ -3,9 +3,6 @@ extern crate serde_derive;
#[derive(Serialize)]
#[serde(tag = "type")]
struct S (
u8,
u8
);
struct S(u8, u8);
fn main() {}
@@ -1,12 +1,8 @@
error: #[serde(tag = "...")] can only be used on enums and structs with named fields
--> $DIR/internally-tagged-tuple.rs:6:10
--> $DIR/internally-tagged-tuple.rs:6:9
|
6 | struct S (
| __________^
7 | | u8,
8 | | u8
9 | | );
| |_^
6 | struct S(u8, u8);
| ^^^^^^^^
error: aborting due to previous error