From 1d496fbc2da46ffee4e5ab25c5517dfbea574b8c Mon Sep 17 00:00:00 2001 From: Joseph Perez Date: Mon, 4 Nov 2024 17:36:49 +0100 Subject: [PATCH] fix: typos --- commons/zenoh-shm/src/api/provider/types.rs | 2 +- commons/zenoh-shm/src/lib.rs | 6 ++---- examples/README.md | 2 +- plugins/zenoh-plugin-trait/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/commons/zenoh-shm/src/api/provider/types.rs b/commons/zenoh-shm/src/api/provider/types.rs index 8237255c5a..8755fb1b1e 100644 --- a/commons/zenoh-shm/src/api/provider/types.rs +++ b/commons/zenoh-shm/src/api/provider/types.rs @@ -166,7 +166,7 @@ impl MemoryLayout { return Err(ZLayoutError::IncorrectLayoutArgs); }; - // size of an allocation must be a miltiple of it's alignment! + // size of an allocation must be a multiple of its alignment! match size.get() % alignment.get_alignment_value() { 0 => Ok(Self { size, alignment }), _ => Err(ZLayoutError::IncorrectLayoutArgs), diff --git a/commons/zenoh-shm/src/lib.rs b/commons/zenoh-shm/src/lib.rs index 20fec9c204..ec17f463f9 100644 --- a/commons/zenoh-shm/src/lib.rs +++ b/commons/zenoh-shm/src/lib.rs @@ -186,16 +186,14 @@ impl ShmBufInner { impl Drop for ShmBufInner { fn drop(&mut self) { - // # Safety - // obviouly, we need to decrement refcount when dropping ShmBufInner instance + // SAFETY: obviously, we need to decrement refcount when dropping ShmBufInner instance unsafe { self.dec_ref_count() }; } } impl Clone for ShmBufInner { fn clone(&self) -> Self { - // # Safety - // obviouly, we need to increment refcount when cloning ShmBufInner instance + // SAFETY: obviously, we need to increment refcount when cloning ShmBufInner instance unsafe { self.inc_ref_count() }; let bp = self.buf.load(Ordering::SeqCst); ShmBufInner { diff --git a/examples/README.md b/examples/README.md index d187244c51..21d1a0ab34 100644 --- a/examples/README.md +++ b/examples/README.md @@ -242,7 +242,7 @@ ### z_liveliness Declares a liveliness token on a given key expression (`group1/zenoh-rs` by default). - This token will be seen alive byt the `z_get_liveliness` and `z_sub_liveliness` until + This token will be seen alive by the `z_get_liveliness` and `z_sub_liveliness` until user explicitly drops the token by pressing `'d'` or implicitly dropped by terminating or killing the `z_liveliness` example. diff --git a/plugins/zenoh-plugin-trait/src/lib.rs b/plugins/zenoh-plugin-trait/src/lib.rs index 5bcb6f5738..9a2a6f83b1 100644 --- a/plugins/zenoh-plugin-trait/src/lib.rs +++ b/plugins/zenoh-plugin-trait/src/lib.rs @@ -33,7 +33,7 @@ //! //! Static plugin is just a type which implements [`Plugin`] trait. It can be added to [`PluginsManager`] by [`PluginsManager::declare_static_plugin`](crate::manager::PluginsManager::declare_static_plugin) method. //! -//! Dynamic plugin is a shared library which exports set of C-repr (unmangled) functions which allows to check plugin compatibility and create plugin instance. These functiuons are defined automatically by [`declare_plugin`] macro. +//! Dynamic plugin is a shared library which exports set of C-repr (unmangled) functions which allows to check plugin compatibility and create plugin instance. These functions are defined automatically by [`declare_plugin`] macro. //! mod compatibility; mod manager;