From 2f6626ed5a723463a9f54b48e3ce541937134578 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Tue, 22 Mar 2022 14:47:43 +0100 Subject: [PATCH] Upgrade to newer tokio and sequoia-ipc versions, bump crate version to 0.2.1. --- scdc/Cargo.toml | 8 ++++---- scdc/src/lib.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scdc/Cargo.toml b/scdc/Cargo.toml index 7843871..b0f7cba 100644 --- a/scdc/Cargo.toml +++ b/scdc/Cargo.toml @@ -6,16 +6,16 @@ name = "openpgp-card-scdc" description = "Experimental SCDaemon Client, for use with the openpgp-card crate" authors = ["Heiko Schaefer "] license = "MIT OR Apache-2.0" -version = "0.2.0" +version = "0.2.1" edition = "2018" repository = "https://gitlab.com/hkos/openpgp-card" documentation = "https://docs.rs/crate/openpgp-card-scdc" [dependencies] openpgp-card = { path = "../openpgp-card", version = "0.2" } -sequoia-ipc = "0.26" +sequoia-ipc = "0.27" hex = "0.4" futures = "0.3" -tokio = "0.2" +tokio = { version = "1.13.1", features = ["rt-multi-thread"] } lazy_static = "1.4" -log = "0.4" \ No newline at end of file +log = "0.4" diff --git a/scdc/src/lib.rs b/scdc/src/lib.rs index 9a9667b..bcdaacf 100644 --- a/scdc/src/lib.rs +++ b/scdc/src/lib.rs @@ -140,7 +140,7 @@ impl ScdBackend { /// Call "SCD SERIALNO", which causes scdaemon to be started by gpg /// agent (if it's not running yet). fn serialno(&mut self) -> Result<(), Error> { - let mut rt = RT.lock().unwrap(); + let rt = RT.lock().unwrap(); let send = "SCD SERIALNO"; self.send2(send)?; @@ -169,7 +169,7 @@ impl ScdBackend { let send = format!("SCD SERIALNO --demand={}", serial); self.send2(&send)?; - let mut rt = RT.lock().unwrap(); + let rt = RT.lock().unwrap(); while let Some(response) = rt.block_on(self.agent.next()) { log::trace!("select res: {:x?}", response); @@ -198,7 +198,7 @@ impl ScdBackend { fn send(&mut self, cmd: &str) -> Result<(), Error> { self.send2(cmd)?; - let mut rt = RT.lock().unwrap(); + let rt = RT.lock().unwrap(); while let Some(response) = rt.block_on(self.agent.next()) { log::trace!("select res: {:x?}", response); @@ -262,7 +262,7 @@ impl CardTransaction for ScdTransaction<'_> { self.scd.send2(&send)?; - let mut rt = RT.lock().unwrap(); + let rt = RT.lock().unwrap(); while let Some(response) = rt.block_on(self.scd.agent.next()) { log::trace!("res: {:x?}", response);