Skip to content

Commit

Permalink
Revert to using wrong case for static variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Feb 27, 2024
1 parent 5592534 commit 5e15c4f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/pool/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,13 @@ macro_rules! arc_pool {
type Data = $data_type;

fn singleton() -> &'static $crate::pool::arc::ArcPoolImpl<$data_type> {
static POOL: $crate::pool::arc::ArcPoolImpl<$data_type> =
// Even though the static variable is not exposed to user code, it is
// still useful to have a descriptive symbol name for debugging.
#[allow(non_upper_case_globals)]
static $name: $crate::pool::arc::ArcPoolImpl<$data_type> =
$crate::pool::arc::ArcPoolImpl::new();

&POOL
&$name
}
}

Expand Down
7 changes: 5 additions & 2 deletions src/pool/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ macro_rules! box_pool {
type Data = $data_type;

fn singleton() -> &'static $crate::pool::boxed::BoxPoolImpl<$data_type> {
static POOL: $crate::pool::boxed::BoxPoolImpl<$data_type> =
// Even though the static variable is not exposed to user code, it is
// still useful to have a descriptive symbol name for debugging.
#[allow(non_upper_case_globals)]
static $name: $crate::pool::boxed::BoxPoolImpl<$data_type> =
$crate::pool::boxed::BoxPoolImpl::new();

&POOL
&$name
}
}

Expand Down
7 changes: 5 additions & 2 deletions src/pool/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ macro_rules! object_pool {
type Data = $data_type;

fn singleton() -> &'static $crate::pool::object::ObjectPoolImpl<$data_type> {
static POOL: $crate::pool::object::ObjectPoolImpl<$data_type> =
// Even though the static variable is not exposed to user code, it is
// still useful to have a descriptive symbol name for debugging.
#[allow(non_upper_case_globals)]
static $name: $crate::pool::object::ObjectPoolImpl<$data_type> =
$crate::pool::object::ObjectPoolImpl::new();

&POOL
&$name
}
}

Expand Down

0 comments on commit 5e15c4f

Please sign in to comment.