Skip to content

Commit c18552f

Browse files
choubachaseanmonstar
authored andcommitted
Implement variant on version to require catch-all (#159)
1 parent a3a8fcb commit c18552f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/version.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ enum Http {
4949
Http11,
5050
H2,
5151
H3,
52+
__NonExhaustive,
5253
}
5354

5455
impl Default for Version {
@@ -68,6 +69,7 @@ impl fmt::Debug for Version {
6869
Http11 => "HTTP/1.1",
6970
H2 => "HTTP/2.0",
7071
H3 => "HTTP/3.0",
72+
__NonExhaustive => unreachable!(),
7173
})
7274
}
7375
}

0 commit comments

Comments
 (0)