Closed abonander closed 2 months ago
str does not implement Tagged despite implementing FixedTag because the blanket impl implicitly requires Sized:
str
Tagged
FixedTag
Sized
impl<T: FixedTag> Tagged for T { fn tag(&self) -> Tag { T::TAG } }
The impl should look like this instead:
impl<T: FixedTag + ?Sized> Tagged for T { fn tag(&self) -> Tag { T::TAG } }
The blanket impl of Encode has the same problem:
Encode
impl<T> Encode for T where T: EncodeValue + Tagged, { // ... }
It should look like this:
impl<T> Encode for T where T: EncodeValue + Tagged + ?Sized, { // ... }
Without this, it's impossible to invoke methods of Encode on str.
str
does not implementTagged
despite implementingFixedTag
because the blanket impl implicitly requiresSized
:The impl should look like this instead:
The blanket impl of
Encode
has the same problem:It should look like this:
Without this, it's impossible to invoke methods of
Encode
onstr
.