Closed R2-t closed 4 months ago
Here's a playground repro: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=cfe82dae43a6307d44955e72f551871a
This behaviour is correct. When you use assert_eq, the string will be printed with debug printing, so you'll see quotes around the string. The string is supposed to contain quotes, as that's how json represents strings.
If you want to see how the string looks really, you should print it with println!("{expected_value} == {serialized_value}");
You need to change your expected value to be r##""AVAILABLE""##
I have the following enum:
And whenever I try to serialize it, I get it back with double quotes around the value, which means that if I run this test I will fail.
I don't think it should be the expected result from it, but if I can get some clarification or help it'd be great!