Skip to content

Commit

Permalink
Address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart committed Jan 29, 2024
1 parent 5e73775 commit 1570b3d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions zenoh/src/net/routing/dispatcher/face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl Primitives for Face {
}
zenoh_protocol::network::DeclareBody::DeclareSubscriber(m) => {
declare_subscription(
&ctrl_lock,
ctrl_lock.as_ref(),
&self.tables,
&mut self.state.clone(),
&m.wire_expr,
Expand All @@ -136,7 +136,7 @@ impl Primitives for Face {
}
zenoh_protocol::network::DeclareBody::UndeclareSubscriber(m) => {
undeclare_subscription(
&ctrl_lock,
ctrl_lock.as_ref(),
&self.tables,
&mut self.state.clone(),
&m.ext_wire_expr.wire_expr,
Expand All @@ -145,7 +145,7 @@ impl Primitives for Face {
}
zenoh_protocol::network::DeclareBody::DeclareQueryable(m) => {
declare_queryable(
&ctrl_lock,
ctrl_lock.as_ref(),
&self.tables,
&mut self.state.clone(),
&m.wire_expr,
Expand All @@ -155,7 +155,7 @@ impl Primitives for Face {
}
zenoh_protocol::network::DeclareBody::UndeclareQueryable(m) => {
undeclare_queryable(
&ctrl_lock,
ctrl_lock.as_ref(),
&self.tables,
&mut self.state.clone(),
&m.ext_wire_expr.wire_expr,
Expand Down
6 changes: 3 additions & 3 deletions zenoh/src/net/routing/dispatcher/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use super::tables::{NodeId, Route, RoutingExpr, Tables, TablesLock};
use crate::net::routing::hat::HatTrait;
use std::borrow::Cow;
use std::collections::HashMap;
use std::sync::Arc;
use std::sync::RwLock;
use std::sync::{Arc, MutexGuard};
use zenoh_core::zread;
use zenoh_protocol::core::key_expr::{keyexpr, OwnedKeyExpr};
use zenoh_protocol::network::declare::subscriber::ext::SubscriberInfo;
Expand All @@ -31,7 +31,7 @@ use zenoh_protocol::{
use zenoh_sync::get_mut_unchecked;

pub(crate) fn declare_subscription(
hat_code: &MutexGuard<'_, Box<dyn HatTrait + Send + Sync>>,
hat_code: &(dyn HatTrait + Send + Sync),
tables: &TablesLock,
face: &mut Arc<FaceState>,
expr: &WireExpr,
Expand Down Expand Up @@ -91,7 +91,7 @@ pub(crate) fn declare_subscription(
}

pub(crate) fn undeclare_subscription(
hat_code: &MutexGuard<'_, Box<dyn HatTrait + Send + Sync>>,
hat_code: &(dyn HatTrait + Send + Sync),
tables: &TablesLock,
face: &mut Arc<FaceState>,
expr: &WireExpr,
Expand Down
6 changes: 3 additions & 3 deletions zenoh/src/net/routing/dispatcher/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::net::routing::hat::HatTrait;
use crate::net::routing::RoutingContext;
use async_trait::async_trait;
use std::collections::HashMap;
use std::sync::{Arc, MutexGuard, Weak};
use std::sync::{Arc, Weak};
use zenoh_config::WhatAmI;
use zenoh_protocol::core::key_expr::keyexpr;
use zenoh_protocol::network::declare::queryable::ext::QueryableInfo;
Expand All @@ -41,7 +41,7 @@ pub(crate) struct Query {
}

pub(crate) fn declare_queryable(
hat_code: &MutexGuard<'_, Box<dyn HatTrait + Send + Sync>>,
hat_code: &(dyn HatTrait + Send + Sync),
tables: &TablesLock,
face: &mut Arc<FaceState>,
expr: &WireExpr,
Expand Down Expand Up @@ -98,7 +98,7 @@ pub(crate) fn declare_queryable(
}

pub(crate) fn undeclare_queryable(
hat_code: &MutexGuard<'_, Box<dyn HatTrait + Send + Sync>>,
hat_code: &(dyn HatTrait + Send + Sync),
tables: &TablesLock,
face: &mut Arc<FaceState>,
expr: &WireExpr,
Expand Down

0 comments on commit 1570b3d

Please sign in to comment.