Skip to content

Minor fixes to pool docs #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- `bytes::BufMut` is now implemented on `VecInner`.
- Removed generic from `history_buf::OldestOrdered`.
- Made `LenType` opt-in.
- Minor fixes to `pool::boxed` docs.

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion src/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//!
//! - ARM architectures which instruction set include the LDREX, CLREX and STREX instructions, e.g.
//! `thumbv7m-none-eabi` but not `thumbv6m-none-eabi`
//! - 32-bit x86, e.g. `i686-unknown-linux-gnu`
//! - 32-bit and 64-bit x86.
//!
//! # Benchmarks
//!
Expand Down
3 changes: 2 additions & 1 deletion src/pool/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//! # Example usage
//!
//! ```
//! use core::ptr::addr_of_mut;
//! use heapless::{box_pool, pool::boxed::{Box, BoxBlock}};
//!
//! box_pool!(MyBoxPool: u128);
Expand Down Expand Up @@ -70,7 +71,7 @@
//! #[allow(clippy::declare_interior_mutable_const)]
//! const BLOCK: BoxBlock<u128> = BoxBlock::new(); // <=
//! static mut BLOCKS: [BoxBlock<u128>; POOL_CAPACITY] = [BLOCK; POOL_CAPACITY];
//! unsafe { addr_of_mut!(BLOCK).as_mut().unwrap()S }
//! unsafe { addr_of_mut!(BLOCKS).as_mut().unwrap() }
//! };
//!
//! for block in blocks {
Expand Down