Implement variant on version to require catch-all (#159)

This commit is contained in:
Kevin Choubacha
2019-05-30 11:42:15 -07:00
committed by Sean McArthur
parent d9a06a6e94
commit 0cd6f5b118
+2
View File
@@ -49,6 +49,7 @@ enum Http {
Http11,
H2,
H3,
__NonExhaustive,
}
impl Default for Version {
@@ -68,6 +69,7 @@ impl fmt::Debug for Version {
Http11 => "HTTP/1.1",
H2 => "HTTP/2.0",
H3 => "HTTP/3.0",
__NonExhaustive => unreachable!(),
})
}
}