readers: Use Reader to connect to YubiKey

Removes the legacy API inherited from `yubico-piv-tool` and uses
the `reader` module exclusively for selecting and opening the PC/SC
reader.
This commit is contained in:
Tony Arcieri
2019-12-02 10:05:17 -08:00
parent 589ca3de12
commit 9ce2ffe938
3 changed files with 96 additions and 94 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ fn connect() {
env_logger::builder().format_timestamp(None).init();
}
let mut yubikey = YubiKey::open(None).unwrap();
let mut yubikey = YubiKey::open().unwrap();
dbg!(&yubikey.version());
dbg!(&yubikey.serial());
}