Skip to content

Commit

Permalink
Make handlers::locked internal properly
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Sep 20, 2024
1 parent ea1b9cb commit f419105
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion zenoh/src/api/handlers/callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use crate::api::handlers::IntoHandler;

/// A function that can transform a [`FnMut`]`(T)` to
/// a [`Fn`]`(T)` with the help of a [`Mutex`](std::sync::Mutex).
#[zenoh_macros::internal]
pub fn locked<T>(fnmut: impl FnMut(T)) -> impl Fn(T) {
let lock = std::sync::Mutex::new(fnmut);
move |x| zlock!(lock)(x)
Expand Down
4 changes: 3 additions & 1 deletion zenoh/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,10 @@ pub mod query {

/// Callback handler trait
pub mod handlers {
#[zenoh_macros::internal]
pub use crate::api::handlers::locked;
pub use crate::api::handlers::{
locked, Callback, CallbackDrop, DefaultHandler, FifoChannel, IntoHandler, RingChannel,
Callback, CallbackDrop, DefaultHandler, FifoChannel, IntoHandler, RingChannel,
RingChannelHandler,
};
}
Expand Down

0 comments on commit f419105

Please sign in to comment.