mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-25 23:17:56 +00:00
Share unit struct Unit between all tests
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user