Closed alexreg closed 2 years ago
That'll break at least canonicity. eg, today we have BinaryHeap: BorshSerialize+Deserialize
, but that is actually a bug: https://github.com/near/borsh-rs/issues/63#issuecomment-1000425206.
But more generally, I think serde doesn't have such impls either, and that reason might be more fundamental.
Yeah, that's sort of what I suspected. Thanks for explaining.
I was just curious, is there any reason that Borsh does not have generic implementations of
BorshSerialize
andBorshDeserialize
for allIntoIterator
andFromIterator
types respectively? Presumably specialisation would then allow overriding this.