mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-20 04:31:04 +00:00
Test transparent attribute
This commit is contained in:
@@ -653,6 +653,14 @@ fn test_gen() {
|
||||
X,
|
||||
),
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[serde(transparent)]
|
||||
struct TransparentWith {
|
||||
#[serde(serialize_with = "ser_x")]
|
||||
#[serde(deserialize_with = "de_x")]
|
||||
x: X,
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user