Integrate bytes test into struct_ test

`newtype` test also integrates test with `Bytes` tag, so be like

Removed the first assert_tokens because it is the same as the first assert in the merged method
This commit is contained in:
Mingun
2023-08-14 03:05:50 +05:00
committed by Mingun
parent 42e63ff942
commit 3dc6829303
@@ -345,36 +345,8 @@ fn struct_() {
Token::StructEnd,
],
);
}
#[test]
fn bytes() {
let value = AdjacentlyTagged::Struct::<u8> { f: 1 };
assert_tokens(
&value,
&[
Token::Struct {
name: "AdjacentlyTagged",
len: 2,
},
Token::Str("t"),
Token::UnitVariant {
name: "AdjacentlyTagged",
variant: "Struct",
},
Token::Str("c"),
Token::Struct {
name: "Struct",
len: 1,
},
Token::Str("f"),
Token::U8(1),
Token::StructEnd,
Token::StructEnd,
],
);
// byte-array field keys
assert_de_tokens(
&value,
&[