RelayId::deserialize doesn't tolerate owned strings
Here's a bug I found when writing tests: sometimes when you try to deserialize an object containing a RelayId
, it fails because the current implementation only handles &str
. The problem is that many deserialization formats need to decode escapes, and so sometimes they need to generate an intermediary String
.
Changing the deserialize impl to use Cow
will solve the problem.