Skip to content

Commit 2ef8b40

Browse files
style(proto): remove manual Option::unwrap() implementation
1 parent 3b98e70 commit 2ef8b40

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

watermelon-proto/src/status_code.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ impl StatusCode {
5454
}
5555

5656
const fn new_internal(val: u16) -> Self {
57-
match NonZero::new(val) {
58-
Some(val) => Self(val),
59-
None => unreachable!(),
60-
}
57+
Self(NonZero::new(val).unwrap())
6158
}
6259
}
6360

0 commit comments

Comments
 (0)