better debug formatting of requests

This commit is contained in:
Martin Algesten
2018-06-22 16:01:51 +02:00
parent 919eab2f12
commit c5c878caca
3 changed files with 41 additions and 3 deletions

View File

@@ -2,13 +2,19 @@ use ascii::AsciiString;
use error::Error;
use std::str::FromStr;
#[derive(Debug, Clone)]
#[derive(Clone)]
/// Wrapper type for a header line.
pub struct Header {
line: AsciiString,
index: usize,
}
impl ::std::fmt::Debug for Header {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::result::Result<(), ::std::fmt::Error> {
write!(f, "{}", self.line)
}
}
impl Header {
/// The header name.
///