Add From Bytes to Vec.

This commit is contained in:
Alejandro Cabeza Romero 2026-05-04 13:01:11 +02:00
parent 910fe0e003
commit 622c6a8c39
No known key found for this signature in database
GPG Key ID: DA3D14AE478030FD

View File

@ -24,6 +24,12 @@ impl From<Vec<u8>> for Bytes {
}
}
impl From<Bytes> for Vec<u8> {
fn from(value: Bytes) -> Self {
value.into_inner()
}
}
impl From<ffi::Bytes> for Bytes {
fn from(mut ffi_value: ffi::Bytes) -> Self {
let vec = if ffi_value.size == 0 || ffi_value.data.is_null() {