@@ -217,7 +217,8 @@ macro_rules! header {
217
217
__hyper__deref!( $id => Vec <$item>) ;
218
218
impl $crate:: header:: Header for $id {
219
219
fn header_name( ) -> & ' static str {
220
- $n
220
+ static NAME : & ' static str = $n;
221
+ NAME
221
222
}
222
223
fn parse_header( raw: & [ Vec <u8 >] ) -> $crate:: Result <Self > {
223
224
$crate:: header:: parsing:: from_comma_delimited( raw) . map( $id)
@@ -243,7 +244,8 @@ macro_rules! header {
243
244
__hyper__deref!( $id => Vec <$item>) ;
244
245
impl $crate:: header:: Header for $id {
245
246
fn header_name( ) -> & ' static str {
246
- $n
247
+ static NAME : & ' static str = $n;
248
+ NAME
247
249
}
248
250
fn parse_header( raw: & [ Vec <u8 >] ) -> $crate:: Result <Self > {
249
251
$crate:: header:: parsing:: from_comma_delimited( raw) . map( $id)
@@ -268,7 +270,8 @@ macro_rules! header {
268
270
__hyper__deref!( $id => $value) ;
269
271
impl $crate:: header:: Header for $id {
270
272
fn header_name( ) -> & ' static str {
271
- $n
273
+ static NAME : & ' static str = $n;
274
+ NAME
272
275
}
273
276
fn parse_header( raw: & [ Vec <u8 >] ) -> $crate:: Result <Self > {
274
277
$crate:: header:: parsing:: from_one_raw_str( raw) . map( $id)
@@ -296,7 +299,8 @@ macro_rules! header {
296
299
}
297
300
impl $crate:: header:: Header for $id {
298
301
fn header_name( ) -> & ' static str {
299
- $n
302
+ static NAME : & ' static str = $n;
303
+ NAME
300
304
}
301
305
fn parse_header( raw: & [ Vec <u8 >] ) -> $crate:: Result <Self > {
302
306
// FIXME: Return None if no item is in $id::Only
0 commit comments