Created
December 22, 2016 15:15
-
-
Save danielbodart/164d4392afc792cefd9136754e46226e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[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