Skip to content

Instantly share code, notes, and snippets.

@danielbodart
Created December 22, 2016 15:15
Show Gist options
  • Select an option

  • Save danielbodart/164d4392afc792cefd9136754e46226e to your computer and use it in GitHub Desktop.

Select an option

Save danielbodart/164d4392afc792cefd9136754e46226e to your computer and use it in GitHub Desktop.
#[derive(PartialEq, Debug)]
pub enum StartLine<'a> {
RequestLine (RequestLine<'a>),
StatusLine (StatusLine<'a>),
}
impl <'a> fmt::Display for StartLine<'a> {
fn fmt(&self, format: &mut fmt::Formatter) -> fmt::Result {
match self {
StartLine::RequestLine(rl) => rl.fmt(format),
// ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `ast::StartLine`
StartLine::StatusLine(sl) => sl.fmt(format),
// ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found enum `ast::StartLine`
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment