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
Don't enforce owned values be written in legacy TLV writing
When writing legacy TLVs, we use a lambda that returns an `Option`
over a specified type. To avoid implicit type confusion issues, we
explicitly check that that lambda writes an `Option<Type>`.
However, we may wish to occasionally write an `Option<&Type>` to
avoid unnecessary allocations.
Here we replace the explicit type confusion check with a
verification by reading the written contents back explicitly using
the specified Type. This should catch most cases of type confusion
as we will generally end up writing a different number of bytes.
0 commit comments