From d42c983e3bfa2983bd563705e4cb76ad865a856c Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Fri, 29 Jun 2018 14:14:29 -0700 Subject: [PATCH] test(http1): fix unused import warnings of Bytes when debug_assertions are off --- src/proto/h1/role.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs index c7f7a0ac22..61cfdd09da 100644 --- a/src/proto/h1/role.rs +++ b/src/proto/h1/role.rs @@ -1,7 +1,7 @@ use std::fmt::{self, Write}; use std::mem; -use bytes::{BytesMut, Bytes}; +use bytes::{BytesMut}; use http::header::{self, Entry, HeaderName, HeaderValue}; use http::{HeaderMap, Method, StatusCode, Version}; use httparse; @@ -20,7 +20,7 @@ macro_rules! header_name { { match HeaderName::from_bytes($bytes) { Ok(name) => name, - Err(_) => panic!("illegal header name from httparse: {:?}", Bytes::from($bytes)), + Err(_) => panic!("illegal header name from httparse: {:?}", ::bytes::Bytes::from($bytes)), } } @@ -36,7 +36,7 @@ macro_rules! header_value { ($bytes:expr) => ({ #[cfg(debug_assertions)] { - let __hvb: Bytes = $bytes; + let __hvb: ::bytes::Bytes = $bytes; match HeaderValue::from_shared(__hvb.clone()) { Ok(name) => name, Err(_) => panic!("illegal header value from httparse: {:?}", __hvb),