Skip to content

Commit 3c4894b

Browse files
committed
fix(pubsub): repeat ZSub's bounds on the generic accessor impl
ZSub declares T: ZMessage, S: ZDeserializer on the struct, so a bare impl<T, Q, S> does not satisfy them.
1 parent e88aaa8 commit 3c4894b

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

crates/hiroz-tests/tests/message_lost.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ use std::{
2020

2121
use common::{TestRouter, create_hiroz_context_with_endpoint};
2222
use hiroz::{
23-
Builder, GidArray, TypeHash,
24-
attachment::Attachment,
25-
event::ZenohEventType,
23+
Builder, GidArray, TypeHash, attachment::Attachment, event::ZenohEventType,
2624
ros_msg::MessageTypeInfo,
2725
};
2826
use serde::{Deserialize, Serialize};

crates/hiroz/src/pubsub.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ impl<T: ZMessage, Q, S: ZDeserializer> std::fmt::Debug for ZSub<T, Q, S> {
10191019
/// needs to install an event callback, and the only way to observe
10201020
/// [`MessageLost`](crate::event::ZenohEventType::MessageLost). Neither field has
10211021
/// anything to do with the queue.
1022-
impl<T, Q, S> ZSub<T, Q, S> {
1022+
impl<T: ZMessage, Q, S: ZDeserializer> ZSub<T, Q, S> {
10231023
/// The event manager this subscriber raises endpoint events on.
10241024
pub fn events_mgr(&self) -> &Arc<Mutex<EventsManager>> {
10251025
&self.events_mgr

0 commit comments

Comments
 (0)