Skip to content

Commit 181d7ce

Browse files
committed
Adjust pgp-wrapper example
Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
1 parent e8211b8 commit 181d7ce

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/pgp-wrapper.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
//!
3434
//! Works perfectly in conjunction with `openpgp-card-agent.rs`!
3535
36-
use std::{cell::RefCell, pin::Pin};
36+
use std::cell::RefCell;
3737

3838
use chrono::DateTime;
3939
use clap::Parser;
@@ -55,11 +55,11 @@ use tokio::runtime::Runtime;
5555
struct WrappedKey {
5656
public_key: PublicKey,
5757
pubkey: KeyData,
58-
client: RefCell<Pin<Box<dyn Session>>>,
58+
client: RefCell<Box<dyn Session>>,
5959
}
6060

6161
impl WrappedKey {
62-
fn new(pubkey: KeyData, client: Pin<Box<dyn Session>>) -> Self {
62+
fn new(pubkey: KeyData, client: Box<dyn Session>) -> Self {
6363
let KeyData::Ed25519(key) = pubkey.clone() else {
6464
panic!("The first key was not ed25519!");
6565
};
@@ -206,11 +206,11 @@ fn main() -> testresult::TestResult {
206206
let (client, identities) = rt.block_on(async move {
207207
#[cfg(unix)]
208208
let mut client =
209-
connect(Binding::FilePath(std::env::var("SSH_AUTH_SOCK")?.into()).try_into()?).await?;
209+
connect(Binding::FilePath(std::env::var("SSH_AUTH_SOCK")?.into()).try_into()?)?;
210210

211211
#[cfg(windows)]
212212
let mut client =
213-
connect(Binding::NamedPipe(std::env::var("SSH_AUTH_SOCK")?.into()).try_into()?).await?;
213+
connect(Binding::NamedPipe(std::env::var("SSH_AUTH_SOCK")?.into()).try_into()?)?;
214214

215215
let identities = client.request_identities().await?;
216216

0 commit comments

Comments
 (0)