We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49f2caf commit 640b420Copy full SHA for 640b420
1 file changed
src/ssz/type/container.zig
@@ -840,8 +840,8 @@ pub fn StructContainerType(comptime ST: type) type {
840
}
841
842
pub fn fromValue(pool: *Node.Pool, value: *const Type) !Node.Id {
843
- const wrapped_ptr: *const WrappedT = @ptrCast(value);
844
- return try pool.createBranchStruct(WrappedT, wrapped_ptr);
+ const wrapped = WrappedT{ .value = value.* };
+ return try pool.createBranchStruct(WrappedT, &wrapped);
845
846
847
pub fn serializeIntoBytes(node: Node.Id, pool: *Node.Pool, out: []u8) !usize {
0 commit comments