Share unit struct Unit between all tests

This commit is contained in:
Mingun 2023-08-07 21:36:16 +05:00
parent 93bda5f1dc
commit 48de0c51b0

View File

@ -12,6 +12,9 @@ use serde_derive::{Deserialize, Serialize};
use serde_test::{assert_de_tokens, assert_de_tokens_error, assert_tokens, Token};
use std::collections::BTreeMap;
#[derive(Debug, PartialEq, Serialize, Deserialize)]
struct Unit;
#[derive(Debug, PartialEq, Serialize, Deserialize)]
struct Newtype(BTreeMap<String, String>);
@ -635,9 +638,6 @@ fn newtype_variant_containing_externally_tagged_enum() {
#[test]
fn newtype_variant_containing_unit_struct() {
#[derive(Debug, PartialEq, Serialize, Deserialize)]
struct Unit;
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "tag")]
enum Message {