aboutsummaryrefslogtreecommitdiff
path: root/src/tests/mod.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2020-07-09 18:57:18 -0700
committerDaniel Mueller <deso@posteo.net>2020-07-09 18:57:18 -0700
commitc461a506f6bf3bf73374df289298879ba9d2d125 (patch)
tree93e2f31400a71b73057b93ecb62279a47d7c80d0 /src/tests/mod.rs
parentefb6fbffdb96c6acd197b8a7c4fe0ed9855a151e (diff)
downloadnitrocli-c461a506f6bf3bf73374df289298879ba9d2d125.tar.gz
nitrocli-c461a506f6bf3bf73374df289298879ba9d2d125.tar.bz2
Remove unwrap_lib_err method from UnwrapError test trait
This change marks the next step in getting rid of the UnwrapError test trait. Specifically, it removes its unwrap_lib_err method.
Diffstat (limited to 'src/tests/mod.rs')
-rw-r--r--src/tests/mod.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/tests/mod.rs b/src/tests/mod.rs
index fd2f9e0..65223ae 100644
--- a/src/tests/mod.rs
+++ b/src/tests/mod.rs
@@ -39,8 +39,6 @@ mod unencrypted;
pub trait UnwrapError {
/// Unwrap a Error::CommandError variant.
fn unwrap_cmd_err(self) -> (Option<&'static str>, nitrokey::CommandError);
- /// Unwrap a Error::LibraryError variant.
- fn unwrap_lib_err(self) -> (Option<&'static str>, nitrokey::LibraryError);
}
impl<T> UnwrapError for crate::Result<T>
@@ -56,16 +54,6 @@ where
err => panic!("Unexpected error variant found: {:?}", err),
}
}
-
- fn unwrap_lib_err(self) -> (Option<&'static str>, nitrokey::LibraryError) {
- match self.unwrap_err() {
- crate::Error::NitrokeyError(ctx, err) => match err {
- nitrokey::Error::LibraryError(err) => (ctx, err),
- err => panic!("Unexpected error variant found: {:?}", err),
- },
- err => panic!("Unexpected error variant found: {:?}", err),
- }
- }
}
struct Nitrocli {