From 76dfd27ef163f44ef45688bf9d23332c822221dc Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Thu, 9 Jul 2020 18:57:18 -0700 Subject: 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. --- src/tests/mod.rs | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/tests/mod.rs') 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 UnwrapError for crate::Result @@ -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 { -- cgit v1.2.1