From 88ec6bcb3268852a239caaae5e8188982620816a Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 20 Nov 2019 12:32:19 +0000 Subject: [PATCH] Remove redundant Result from ykpiv_disconnect --- src/yubikey.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/yubikey.rs b/src/yubikey.rs index 3a3a8dd..1e25ff4 100644 --- a/src/yubikey.rs +++ b/src/yubikey.rs @@ -216,7 +216,7 @@ pub unsafe fn ykpiv_done(state: &mut YubiKey) -> Result<(), ErrorKind> { } /// Disconnect a YubiKey session -pub unsafe fn ykpiv_disconnect(state: &mut YubiKey) -> Result<(), ErrorKind> { +pub unsafe fn ykpiv_disconnect(state: &mut YubiKey) { if state.card != 0 { SCardDisconnect(state.card, 0x1); state.card = 0i32; @@ -226,8 +226,6 @@ pub unsafe fn ykpiv_disconnect(state: &mut YubiKey) -> Result<(), ErrorKind> { SCardReleaseContext(state.context); state.context = -1i32; } - - Ok(()) } /// Select application