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
In general, the codebase currently tends to use the Readable trait with two
different semantics -- some objects know when to stop reading because they have
a length prefix and some automatically read to the end of the reader.
This differing usage can lead to bugs. For objects that read-to-end, it would
be much safer if the compiler enforced that they could only be read from a
length-limiting reader.
We already have a LengthReadable trait that requires the underlying reader to
provide the length, which is similar to what we want. So rather than adding an
additional trait, here we refactor LengthReadable to require a fixed length
reader.
Upcoming commits will switch read-to-end structs that are currently read with
Readable to use LengthReadable instead.
0 commit comments