Skip to content

Commit e795e07

Browse files
committed
Fix openpgp-card-agent example
Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
1 parent 3af10b9 commit e795e07

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

examples/openpgp-card-agent.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
1717
use std::{sync::Arc, time::Duration};
1818

19-
#[cfg(windows)]
20-
use ssh_agent_lib::agent::NamedPipeListener as Listener;
21-
22-
#[cfg(not(windows))]
23-
use tokio::net::UnixListener as Listener;
2419
use card_backend_pcsc::PcscBackend;
2520
use clap::Parser;
2621
use openpgp_card::{
@@ -31,8 +26,10 @@ use openpgp_card::{
3126
use retainer::{Cache, CacheExpiration};
3227
use secrecy::{ExposeSecret, SecretString};
3328
use service_binding::Binding;
29+
#[cfg(windows)]
30+
use ssh_agent_lib::agent::NamedPipeListener as Listener;
3431
use ssh_agent_lib::{
35-
agent::{bind, Session, Agent},
32+
agent::{bind, Agent, Session},
3633
error::AgentError,
3734
proto::{AddSmartcardKeyConstrained, Identity, KeyConstraint, SignRequest, SmartcardKey},
3835
};
@@ -42,6 +39,8 @@ use ssh_key::{
4239
};
4340
use testresult::TestResult;
4441
use tokio::net::TcpListener;
42+
#[cfg(not(windows))]
43+
use tokio::net::UnixListener as Listener;
4544

4645
struct CardAgent {
4746
pwds: Arc<Cache<String, SecretString>>,

0 commit comments

Comments
 (0)