diff --git a/commons/zenoh-config/src/wrappers.rs b/commons/zenoh-config/src/wrappers.rs index bdcea8a52f..d04950f21e 100644 --- a/commons/zenoh-config/src/wrappers.rs +++ b/commons/zenoh-config/src/wrappers.rs @@ -35,6 +35,10 @@ impl ZenohId { pub fn into_keyexpr(self) -> OwnedKeyExpr { self.into() } + + pub fn to_le_bytes(self) -> [u8; uhlc::ID::MAX_SIZE] { + self.0.to_le_bytes() + } } impl fmt::Debug for ZenohId { @@ -81,13 +85,6 @@ impl From for OwnedKeyExpr { } } -impl From for [u8; ZenohIdProto::MAX_SIZE] { - fn from(value: ZenohId) -> Self { - let proto: ZenohIdProto = value.into(); - proto.to_le_bytes() - } -} - impl From<&ZenohId> for OwnedKeyExpr { fn from(zid: &ZenohId) -> Self { (*zid).into()