Skip to content

Commit

Permalink
test(http1): fix unused import warnings of Bytes when debug_assertion…
Browse files Browse the repository at this point in the history
…s are off
  • Loading branch information
seanmonstar committed Jun 29, 2018
1 parent b9ab8be commit d42c983
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/proto/h1/role.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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)),
}
}

Expand All @@ -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),
Expand Down

0 comments on commit d42c983

Please sign in to comment.