Skip to content

Commit 5e15c4f

Browse files
committed
Revert to using wrong case for static variable name.
1 parent 5592534 commit 5e15c4f

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

src/pool/arc.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,13 @@ macro_rules! arc_pool {
8989
type Data = $data_type;
9090

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

95-
&POOL
98+
&$name
9699
}
97100
}
98101

src/pool/boxed.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@ macro_rules! box_pool {
101101
type Data = $data_type;
102102

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

107-
&POOL
110+
&$name
108111
}
109112
}
110113

src/pool/object.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,13 @@ macro_rules! object_pool {
8888
type Data = $data_type;
8989

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

94-
&POOL
97+
&$name
9598
}
9699
}
97100

0 commit comments

Comments
 (0)