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
{{ message }}
This repository was archived by the owner on Dec 17, 2024. It is now read-only.
I had a hard time finding out about how to use assert_de_tokens_error in combination with types having both readable and compact representation.
If one simply uses assert_de_tokens_error::<Foo> for a type Foo with both readable and compact representation, the following error message is provided:
Types which have different human-readable and compact representations
must explicitly mark their test cases with `serde_test::Configure`
This makes sense in general but isn't really that helpful.
It took me way too long to realize that the correct calls to achieve this are assert_de_tokens_error::<Compact<Foo>> and assert_de_tokens_error::<Readable<Foo>>.
This, again, makes sense but isn't that obvious, especially given the original error message.
It would be nice to provide some examples for this use case in the documentation of assert_de_tokens_error.