Skip to content

Commit ee420ca

Browse files
committed
refactor: Unified match branches with same code
1 parent a7c03db commit ee420ca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/error.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ impl std::fmt::Display for PointerError {
3535
impl std::error::Error for PointerError {
3636
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
3737
match *self {
38-
Self::Null => None,
39-
Self::Invalid => None,
38+
Self::Null | Self::Invalid => None,
4039
Self::Utf8Error(ref e) => Some(e),
4140
}
4241
}

0 commit comments

Comments
 (0)