chore(client): place the use of new rust features behind cfg

This commit is contained in:
Niv Kaminer
2018-08-04 10:21:57 +03:00
committed by Sean McArthur
parent 97f4243a59
commit 9f8add6056
5 changed files with 83 additions and 1 deletions

View File

@@ -2,6 +2,8 @@ use bytes::BytesMut;
use http::HeaderMap;
use http::header::{CONTENT_LENGTH, TRANSFER_ENCODING};
use http::header::{HeaderValue, OccupiedEntry, ValueIter};
#[cfg(not(inherent_ascii))]
use std::ascii::AsciiExt;
pub fn connection_keep_alive(value: &HeaderValue) -> bool {
connection_has(value, "keep-alive")