Revert to using wrong case for static variable name.

This commit is contained in:
Markus Reiter 2024-02-20 13:48:44 +01:00
parent 5592534dd3
commit 5e15c4f03f
No known key found for this signature in database
GPG Key ID: 245293B51702655B
3 changed files with 15 additions and 6 deletions

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}