You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using "tag" and "content" at the same time on the enum have the same issue:
#[derive(Deserialize, Serialize)]
struct A {
#[serde(flatten)]
b: B,
}
#[derive(Deserialize, Serialize)]
#[serde(tag = "a", content = "b")]
enum B {
C,
}
let a = A { b: B::C };
let s = serde_bencode::to_string(&a).unwrap();
let _: A = serde_bencode::from_bytes(s.as_bytes()).unwrap();
I think these two failing tests could be the same problem because they both use
#[serde(flatten)]
for anenum
field.cargo test ser_de_flattened_enum -- --nocapture
cargo test ser_de_flattened_adjacently_tagged_enum -- --nocapture
Failing test 1
Failing test 2
Related commits
The text was updated successfully, but these errors were encountered: