From 91a4a42fe6168b7466df2d3003fced5f62593807 Mon Sep 17 00:00:00 2001 From: Tyler Beckman Date: Thu, 28 Sep 2023 11:57:26 -0600 Subject: [PATCH] Fix a few clippy recommendations --- src/commands/keys/import/gpg.rs | 2 +- src/commands/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/keys/import/gpg.rs b/src/commands/keys/import/gpg.rs index 12c8c05..9103b22 100644 --- a/src/commands/keys/import/gpg.rs +++ b/src/commands/keys/import/gpg.rs @@ -261,7 +261,7 @@ impl AspmSubcommand for KeysImportGpgCommand { }; // Because GPGME's context object is not 'Send', normal .await can't be used here, so this just blocks as a workaround let res = runtime - .block_on(async { keys::Entity::insert(entry).exec(&state.db).await }) + .block_on(keys::Entity::insert(entry).exec(&state.db)) .context("Unable to add key to database")?; if res.last_insert_id != asp_key.fingerprint { bail!("The key was unable to be saved to the database") diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 72c7b92..9907a54 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -13,7 +13,7 @@ pub trait AspmSubcommand: Parser + Sync { panic!("Not implemented") } fn execute_sync(&self, state: AspmState, runtime: Runtime) -> Result<(), anyhow::Error> { - runtime.block_on(async { self.execute(state).await }) + runtime.block_on(self.execute(state)) } }