File tree 3 files changed +15
-6
lines changed
3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -89,10 +89,13 @@ macro_rules! arc_pool {
89
89
type Data = $data_type;
90
90
91
91
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> =
93
96
$crate:: pool:: arc:: ArcPoolImpl :: new( ) ;
94
97
95
- & POOL
98
+ & $name
96
99
}
97
100
}
98
101
Original file line number Diff line number Diff line change @@ -101,10 +101,13 @@ macro_rules! box_pool {
101
101
type Data = $data_type;
102
102
103
103
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> =
105
108
$crate:: pool:: boxed:: BoxPoolImpl :: new( ) ;
106
109
107
- & POOL
110
+ & $name
108
111
}
109
112
}
110
113
Original file line number Diff line number Diff line change @@ -88,10 +88,13 @@ macro_rules! object_pool {
88
88
type Data = $data_type;
89
89
90
90
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> =
92
95
$crate:: pool:: object:: ObjectPoolImpl :: new( ) ;
93
96
94
- & POOL
97
+ & $name
95
98
}
96
99
}
97
100
You can’t perform that action at this time.
0 commit comments