Skip to content

Commit

Permalink
fix: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfo committed Nov 4, 2024
1 parent cb37c29 commit 1d496fb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion commons/zenoh-shm/src/api/provider/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
6 changes: 2 additions & 4 deletions commons/zenoh-shm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-trait/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1d496fb

Please sign in to comment.