Skip to content

Commit 214f593

Browse files
committed
test(headers): fix ProxyAuthorization bench_headers error
1 parent c93cdb2 commit 214f593

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/header/common/proxy_authorization.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,13 @@ mod tests {
186186
}
187187
}
188188

189-
bench_header!(raw, ProxyAuthorization<String>, { vec![b"foo bar baz".to_vec()] });
190-
bench_header!(basic, ProxyAuthorization<Basic>, { vec![b"Basic QWxhZGRpbjpuIHNlc2FtZQ==".to_vec()] });
191-
bench_header!(bearer, ProxyAuthorization<Bearer>, { vec![b"Bearer fpKL54jvWmEGVoRdCNjG".to_vec()] });
189+
#[cfg(test)]
190+
#[cfg(feature = "nightly")]
191+
mod benches {
192+
use super::ProxyAuthorization;
193+
use ::header::{Basic, Bearer};
194+
195+
bench_header!(raw, ProxyAuthorization<String>, { vec![b"foo bar baz".to_vec()] });
196+
bench_header!(basic, ProxyAuthorization<Basic>, { vec![b"Basic QWxhZGRpbjpuIHNlc2FtZQ==".to_vec()] });
197+
bench_header!(bearer, ProxyAuthorization<Bearer>, { vec![b"Bearer fpKL54jvWmEGVoRdCNjG".to_vec()] });
198+
}

0 commit comments

Comments
 (0)