Skip to content

Instantly share code, notes, and snippets.

@huonw
Forked from alexcrichton/gist:6239056
Last active December 21, 2015 02:59
Show Gist options
  • Save huonw/6239071 to your computer and use it in GitHub Desktop.
Save huonw/6239071 to your computer and use it in GitHub Desktop.
use std::rt::io;
struct HttpResponse<'self> {
out: &'self mut io::Writer,
}
fn write_http_header(_: &mut &mut io::Writer) {}
// fn write_http_header<W: io::Writer>(_: &mut W) {}
impl<'self> HttpResponse<'self> {
fn respond(&mut self) {
write_http_header(&mut self.out);
}
}
fn main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment