Skip to content

Commit

Permalink
refactor: Use DeclareToken/UndeclareToken in liveliness declarati…
Browse files Browse the repository at this point in the history
…on/undeclaration
  • Loading branch information
fuzzypixelz committed Mar 26, 2024
1 parent 97e3eed commit 8961ba3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zenoh/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ use zenoh_protocol::{
declare::{
self, common::ext::WireExprType, queryable::ext::QueryableInfo,
subscriber::ext::SubscriberInfo, Declare, DeclareBody, DeclareKeyExpr,
DeclareQueryable, DeclareSubscriber, UndeclareQueryable, UndeclareSubscriber,
DeclareQueryable, DeclareSubscriber, DeclareToken, UndeclareQueryable,
UndeclareSubscriber, UndeclareToken,
},
ext,
request::{self, ext::TargetType, Request},
Expand Down Expand Up @@ -1305,10 +1306,9 @@ impl Session {
ext_qos: declare::ext::QoSType::DECLARE,
ext_tstamp: None,
ext_nodeid: declare::ext::NodeIdType::DEFAULT,
body: DeclareBody::DeclareSubscriber(DeclareSubscriber {
body: DeclareBody::DeclareToken(DeclareToken {
id,
wire_expr: key_expr.to_wire(self).to_owned(),
ext_info: SubscriberInfo::DEFAULT,
}),
});
Ok(tok_state)
Expand All @@ -1329,7 +1329,7 @@ impl Session {
ext_qos: ext::QoSType::DECLARE,
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
body: DeclareBody::UndeclareToken(UndeclareToken {
id: tok_state.id,
ext_wire_expr: WireExprType::null(),
}),
Expand Down

0 comments on commit 8961ba3

Please sign in to comment.