`Vec<u8>` is a more idiomatic Rust type to return for serialization. For the C++ kernel, we are able to return this type with no extra copying. We still use `SerializedData` type for FFI, but convert the result into a `Vec<u8>` using a new `into_vec` method. The upb kernel serializes onto an arena, so for upb we do need to copy the data to get it into a `Vec<u8>`. PiperOrigin-RevId: 644444571pull/17113/head
parent
2088bc6e66
commit
ccbed29c67
4 changed files with 32 additions and 11 deletions
Loading…
Reference in new issue