diff --git a/zenoh-ext/src/serialization.rs b/zenoh-ext/src/serialization.rs index 61a3186955..4258829d52 100644 --- a/zenoh-ext/src/serialization.rs +++ b/zenoh-ext/src/serialization.rs @@ -45,9 +45,9 @@ pub trait Deserialize: Sized { } } -pub fn z_serialize(t: &T) -> ZBytes { +pub fn z_serialize(t: &T) -> ZBytes { let mut zbytes = ZBytes::new(); - ZSerializer::new(&mut zbytes).serialize(t); + ZSerializer::new(&mut zbytes).serialize(&t); zbytes }