Skip to content
Draft
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 @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]

- Make MSRV of 1.87.0 explicit.
- Allow setting visibility for the pool struct in the `box_pool!` macro.

## [v0.9.1] - 2025-08-19

Expand Down
7 changes: 4 additions & 3 deletions src/pool/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
//! use core::ptr::addr_of_mut;
//! use heapless::{box_pool, pool::boxed::BoxBlock};
//!
//! box_pool!(MyBoxPool: u128);
//! // You can optionally set visibility for the pool struct.
//! box_pool!(pub MyBoxPool: u128);
//!
//! const POOL_CAPACITY: usize = 8;
//!
Expand Down Expand Up @@ -96,8 +97,8 @@ use super::treiber::{NonNullPtr, Stack, UnionNode};
/// For more extensive documentation see the [module level documentation](crate::pool::boxed)
#[macro_export]
macro_rules! box_pool {
($name:ident: $data_type:ty) => {
pub struct $name;
($visibility:vis $name:ident: $data_type:ty) => {
$visibility struct $name;

impl $crate::pool::boxed::BoxPool for $name {
type Data = $data_type;
Expand Down