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)) } }