fix lint, revert incorrect change

This commit is contained in:
Simon Laux
2024-10-10 15:22:25 +02:00
parent e4ccb5287b
commit 6845e81608
2 changed files with 1 additions and 2 deletions

View File

@@ -354,7 +354,7 @@ async fn start(args: Vec<String>) -> Result<(), Error> {
match readline {
Ok(line) => {
rl.add_history_entry(line.as_str())?;
let should_continue = spawn_named_blocking_task!("repl:handle_cmd", async {
let should_continue = Handle::current().block_on(async {
match handle_cmd(line.trim(), ctx.clone(), &mut selected_chat).await {
Ok(ExitResult::Continue) => true,
Ok(ExitResult::Exit) => {

View File

@@ -16,7 +16,6 @@ use pgp::crypto::hash::HashAlgorithm;
use pgp::crypto::sym::SymmetricKeyAlgorithm;
use pgp::types::{CompressionAlgorithm, KeyTrait, Mpi, PublicKeyTrait, StringToKey};
use rand::{thread_rng, CryptoRng, Rng};
use tokio::runtime::Handle;
use crate::constants::KeyGenType;
use crate::key::{DcKey, Fingerprint};