Skip to content

Commit

Permalink
Format regression tests with rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 22, 2024
1 parent 1b8310d commit 29d4f3e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions test_suite/tests/regression/issue2565.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use serde_derive::{Serialize, Deserialize};
use serde_derive::{Deserialize, Serialize};
use serde_test::{assert_tokens, Token};

#[derive(Serialize, Deserialize, Debug, PartialEq)]
Expand All @@ -18,11 +18,15 @@ fn simple_variant() {
assert_tokens(
&Enum::Simple { a: 42 },
&[
Token::StructVariant { name: "Enum", variant: "Simple", len: 1 },
Token::StructVariant {
name: "Enum",
variant: "Simple",
len: 1,
},
Token::Str("a"),
Token::I32(42),
Token::StructVariantEnd,
]
],
);
}

Expand All @@ -31,11 +35,14 @@ fn flatten_variant() {
assert_tokens(
&Enum::Flatten { flatten: (), a: 42 },
&[
Token::NewtypeVariant { name: "Enum", variant: "Flatten" },
Token::NewtypeVariant {
name: "Enum",
variant: "Flatten",
},
Token::Map { len: None },
Token::Str("a"),
Token::I32(42),
Token::MapEnd,
]
],
);
}

0 comments on commit 29d4f3e

Please sign in to comment.