Closed vnghia closed 7 months ago
Hello,
Thank you for your crate. I found one bug here.
#[derive(Deserialize, Debug, PartialEq)] struct InnerType { pub a: Option<u32>, } #[derive(Deserialize, Debug, PartialEq)] struct OuterType { #[serde(flatten)] pub inner: InnerType, } #[test] fn deserialize_flatten() { let params = OuterType { inner: InnerType { a: Some(10) } }; assert_eq!(super::from_str("a=10"), Ok(params)); }
this code failed with Error("invalid type: string \"10\", expected u32"). It seems that other features do not work as well.
Error("invalid type: string \"10\", expected u32")
Hi! I'm afraid this is an instance of https://github.com/serde-rs/serde/issues/1183 and not something this library can fix. My recommendation is to avoid serde(flatten) if you can.
serde(flatten)
Hello,
Thank you for your crate. I found one bug here.
this code failed with
Error("invalid type: string \"10\", expected u32")
. It seems that other features do not work as well.