summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2023-08-08 18:13:54 -0400
committerBotahamec <botahamec@outlook.com>2023-08-08 18:13:54 -0400
commitb9dfd2ceef09012a1917eab192b2a90a5372d349 (patch)
tree28e82e6e93627ee13eb389e38294e8eb6c040a84 /src
parent2bf91f46dc4cdb943c2dcfbb44e1ddac170e3bee (diff)
Add an unexpect fn for Result<T, RawUnexpected>
Diffstat (limited to 'src')
-rw-r--r--src/result.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/result.rs b/src/result.rs
index 987fc3a..7afceed 100644
--- a/src/result.rs
+++ b/src/result.rs
@@ -65,6 +65,12 @@ impl<T, E: Error + Send + Sync + 'static> ResultErrorExt<T> for Result<T, E> {
}
}
+impl<T> ResultErrorExt<T> for Result<T, RawUnexpected> {
+ fn unexpect(self) -> Self {
+ self
+ }
+}
+
/// Provides [`Result::unexpect_msg`]
///
/// [`Result::unexpect_msg`]: `ResultMsgExt::unexpect_msg`