Could someone add context to a bug?

I ran into this serde bug. It looks like BorrowCow in serde_with solves this issue well enough. I cannot update the bug to point this out for anyone that lands on the bug like I did. Could someone update the bug with an example?

eg

    #[serde_as]
    #[derive(Deserialize)]
    pub struct Foo<'a> {
         #[serde_as(as = "Option<BorrowCow>")]
        pub bar: Option<Cow<'a, str>>
   }

This seems to already be mentioned in the issue: #[serde(borrow)] does not work with Option<Cow<'a, str>> · Issue #2016 · serde-rs/serde · GitHub

Ah true enough

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.