Skip to content

Commit 5c8046e

Browse files
committed
Add test for box_pool with CamelCase types
1 parent 4a811ae commit 5c8046e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1414
### Fixed
1515

1616
- Fixed clippy lints.
17+
- Fixed `box_pool!` emitting clippy lints for `CamelCase` types.
1718

1819
## [v0.8.0] - 2023-11-07
1920

src/pool/boxed.rs

+7
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

@@ -554,4 +555,10 @@ mod tests {
554555
assert!(once.is_ok());
555556
assert!(twice.is_ok());
556557
}
558+
559+
#[test]
560+
fn box_pool_case() {
561+
// https://github.com/rust-embedded/heapless/issues/411
562+
box_pool!(CamelCaseType: u128);
563+
}
557564
}

0 commit comments

Comments
 (0)