Skip to content

Commit

Permalink
Merge commit '075f2ad30f4143104bf917246f1f90f100770c3b'
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowhatter committed Nov 26, 2024
2 parents 58704bb + 075f2ad commit ffc487a
Show file tree
Hide file tree
Showing 6 changed files with 1,099 additions and 1,088 deletions.
14 changes: 14 additions & 0 deletions commons/zenoh-config/src/mode_dependent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ impl<'a> serde::Deserialize<'a> for ModeDependentValue<i64> {
Ok(ModeDependentValue::Unique(value))
}

fn visit_u64<E>(self, value: u64) -> Result<Self::Value, E>
where
E: de::Error,
{
Ok(ModeDependentValue::Unique(value as i64))
}

fn visit_map<M>(self, map: M) -> Result<Self::Value, M::Error>
where
M: MapAccess<'de>,
Expand Down Expand Up @@ -222,6 +229,13 @@ impl<'a> serde::Deserialize<'a> for ModeDependentValue<f64> {
Ok(ModeDependentValue::Unique(value))
}

fn visit_u64<E>(self, value: u64) -> Result<Self::Value, E>
where
E: de::Error,
{
Ok(ModeDependentValue::Unique(value as f64))
}

fn visit_i64<E>(self, value: i64) -> Result<Self::Value, E>
where
E: de::Error,
Expand Down
2 changes: 1 addition & 1 deletion commons/zenoh-shm/src/api/provider/shm_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ where
}

/// Deallocating policy.
/// Forcely deallocate up to N buffers until allocation succeeds.
/// Forcibly deallocate up to N buffers until allocation succeeds.
#[zenoh_macros::unstable_doc]
pub struct Deallocate<
const N: usize,
Expand Down
2 changes: 1 addition & 1 deletion commons/zenoh-shm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl ShmBufInner {
/// # Safety
/// You should understand what you are doing, as overestimation
/// of the reference counter can lead to memory being stalled until
/// recovered by watchdog subsystem or forcely deallocated
/// recovered by watchdog subsystem or forcibly deallocated
pub unsafe fn inc_ref_count(&self) {
self.header.header().refcount.fetch_add(1, Ordering::SeqCst);
}
Expand Down
7 changes: 6 additions & 1 deletion plugins/zenoh-plugin-trait/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//!
//! To build a plugin, implement [`Plugin`].
//!
//! If building a plugin for [`zenohd`](https://crates.io/crates/zenoh), you should use the types exported in [`zenoh::plugins`](https://docs.rs/zenoh/latest/zenoh/plugins) to fill [`Plugin`]'s associated types.
//! If building a plugin for [`zenohd`](https://crates.io/crates/zenoh), you should use the types exported in [`zenoh::plugins`](https://docs.rs/zenoh/latest/zenoh/plugins) to fill [`Plugin`]'s associated types.
//! To check your plugin typing for `zenohd`, have your plugin implement [`zenoh::plugins::ZenohPlugin`](https://docs.rs/zenoh/latest/zenoh/plugins/struct.ZenohPlugin)
//!
//! Plugin is a struct which implements the [`Plugin`] trait. This trait has two associated types:
Expand Down Expand Up @@ -51,3 +51,8 @@ use zenoh_util::concat_enabled_features;

pub const FEATURES: &str =
concat_enabled_features!(prefix = "zenoh-plugin-trait", features = ["default"]);

#[doc(hidden)]
pub mod export {
pub use git_version;
}
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-trait/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ macro_rules! plugin_version {
#[macro_export]
macro_rules! plugin_long_version {
() => {
git_version::git_version!(prefix = "v", cargo_prefix = "v")
$crate::export::git_version::git_version!(prefix = "v", cargo_prefix = "v")
};
}

Expand Down
Loading

0 comments on commit ffc487a

Please sign in to comment.