Skip to content

Commit

Permalink
fix: add ?Sized bound to z_serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfo committed Sep 26, 2024
1 parent aec6cf3 commit 8197e68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zenoh-ext/src/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ pub trait Deserialize: Sized {
}
}

pub fn z_serialize<T: Serialize>(t: &T) -> ZBytes {
pub fn z_serialize<T: Serialize + ?Sized>(t: &T) -> ZBytes {
let mut zbytes = ZBytes::new();
ZSerializer::new(&mut zbytes).serialize(t);
ZSerializer::new(&mut zbytes).serialize(&t);
zbytes
}

Expand Down

0 comments on commit 8197e68

Please sign in to comment.