Skip to content

Commit

Permalink
Adjust pgp-wrapper example
Browse files Browse the repository at this point in the history
Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
  • Loading branch information
wiktor-k committed May 13, 2024
1 parent e8211b8 commit 6f3d4f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/pgp-wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
//!
//! Works perfectly in conjunction with `openpgp-card-agent.rs`!
use std::{cell::RefCell, pin::Pin};
use std::cell::RefCell;

use chrono::DateTime;
use clap::Parser;
Expand All @@ -55,11 +55,11 @@ use tokio::runtime::Runtime;
struct WrappedKey {
public_key: PublicKey,
pubkey: KeyData,
client: RefCell<Pin<Box<dyn Session>>>,
client: RefCell<Box<dyn Session>>,
}

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

#[cfg(windows)]
let mut client =
Expand Down

0 comments on commit 6f3d4f5

Please sign in to comment.