Skip to content

Commit cac2a10

Browse files
committed
Merge pull request #158 from dpc/master
Fix `HeaderFormatter`.
2 parents 00a1452 + db72cb5 commit cac2a10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/header/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,12 @@ impl<H: hash::Writer> hash::Hash<H> for CaseInsensitive {
481481

482482
/// A wrapper around any Header with a Show impl that calls fmt_header.
483483
///
484-
/// This can be used like so: `format!("{}", ShowHeader(header))` to
484+
/// This can be used like so: `format!("{}", HeaderFormatter(&header))` to
485485
/// get the representation of a Header which will be written to an
486486
/// outgoing TcpStream.
487-
pub struct HeaderFormatter<H: HeaderFormat>(H);
487+
pub struct HeaderFormatter<'a, H: HeaderFormat>(pub &'a H);
488488

489-
impl<H: HeaderFormat> Show for HeaderFormatter<H> {
489+
impl<'a, H: HeaderFormat> Show for HeaderFormatter<'a, H> {
490490
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
491491
self.0.fmt_header(f)
492492
}

0 commit comments

Comments
 (0)