Shockingly Good

Results 150 comments of Shockingly Good

I've just checked again and I don't think I may come up with a generic solution. Custom deserialisation will always work (at least it should), but can't think of something...

Of course, this will work, and I could have implemented it myself, but this is not a generic solution I am looking for. For example, such a way still won't...

Hi @jlgerber ! Yes, the name is, unfortunately, confusing, I had plans to reorganise everything differently, but it is still yet to happen. And your thoughts are absolutely logical and...

You have still made a reasonable point. As I have wanted for so long to fix this, I now have another good reason for that. So, I'll close it and...

Hi @bjeanes and, first of all, thanks for raising an issue! This behaviour comes from the default behaviour of [`str::split`](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=72a8c2487dcf2f00641ad629c9601be0): ```rust fn main() { let s = "1-2-3---4"; for ss...

I've pushed some changes to address this issue in a simple and backwards-compatible manner: https://github.com/vityafx/serde-aux/commit/33ddb1e747800b749ee51e75fbe1e3eada90ba75 [Would you like to try it out?](https://crates.io/crates/serde-aux/3.2.0)

> Hi @vityafx that definitely worked, though I wouldn't call it backwards compatible, as you've addded an argument to `new()`, which is a public fn: > > > > >...

Hi! Sorry for the late response. If this is still an issue, I can't reproduce it currently using this code: ```rust use serde_aux::prelude::*; #[derive(serde::Serialize, serde::Deserialize, Debug)] struct MyStruct { #[serde(deserialize_with...

Hopefully, I helped. If you have any more questions, do not hesitate to ask.

I guess this is different because of the `#[serde(default)]`, as [the example from the documentation](https://docs.rs/serde-aux/2.1.0/serde_aux/field_attributes/fn.deserialize_default_from_empty_object.html) works fine: ```rust use serde_aux::prelude::*; #[derive(serde::Serialize, serde::Deserialize, Debug)] struct MyStruct { #[serde(deserialize_with = "deserialize_default_from_empty_object")] empty_as_default:...