Skip to content

Commit 02ec3f3

Browse files
committed
Add test for box_pool with CamelCase types
1 parent fa67f35 commit 02ec3f3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/pool/boxed.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ macro_rules! box_pool {
100100
type Data = $data_type;
101101

102102
fn singleton() -> &'static $crate::pool::boxed::BoxPoolImpl<$data_type> {
103+
#[allow(non_upper_case_globals)]
103104
static $name: $crate::pool::boxed::BoxPoolImpl<$data_type> =
104105
$crate::pool::boxed::BoxPoolImpl::new();
105106

@@ -557,4 +558,10 @@ mod tests {
557558
assert!(once.is_ok());
558559
assert!(twice.is_ok());
559560
}
561+
562+
#[test]
563+
fn box_pool_case() {
564+
// https://github.com/rust-embedded/heapless/issues/411
565+
box_pool!(CamelCaseType: u128);
566+
}
560567
}

0 commit comments

Comments
 (0)