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
T::minimum_bytes_needed() for some types returns hardcoded values, instead of values based on size_of::<T>(), which leads to errors on 64-bits machines. For example, encoding a BTreeSet with more than 2**32 elements won't work properly.
Now Readable and Writable are only implemented for fixed-size arrays up to 16. Please use generic const expressions and implement them for any size array.
Readable and Writable are not implemented for &[u8] and similar types which is a shame.
Please, consider fixing these issues. If you need a PR, I can provide you with one.
The text was updated successfully, but these errors were encountered:
The first point is a feature, not a bug. If you need to store more than 2^32 elements you can always use the length_type attribute or create a newtype. Besides, we can't really change this without breaking backwards compatibility even if we wanted to as the serialization format is stable and will not change.
Points (2) and (3) are indeed reasonable and could indeed be fixed.
T::minimum_bytes_needed()
for some types returns hardcoded values, instead of values based onsize_of::<T>()
, which leads to errors on 64-bits machines. For example, encoding aBTreeSet
with more than 2**32 elements won't work properly.Now
Readable
andWritable
are only implemented for fixed-size arrays up to 16. Please use generic const expressions and implement them for any size array.Readable
andWritable
are not implemented for&[u8]
and similar types which is a shame.Please, consider fixing these issues. If you need a PR, I can provide you with one.
The text was updated successfully, but these errors were encountered: