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
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.
The text was updated successfully, but these errors were encountered:
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 typeFoo
with both readable and compact representation, the following error message is provided: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>>
andassert_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
.The text was updated successfully, but these errors were encountered: