1
0
Fork 0
mirror of https://codeberg.org/tyy/aspm synced 2024-12-23 00:09:28 -07:00

Fix a few clippy recommendations

This commit is contained in:
Tyler Beckman 2023-09-28 11:57:26 -06:00
parent 43851d1f98
commit 91a4a42fe6
Signed by: Ty
GPG key ID: 2813440C772555A4
2 changed files with 2 additions and 2 deletions

View file

@ -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 // 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 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")?; .context("Unable to add key to database")?;
if res.last_insert_id != asp_key.fingerprint { if res.last_insert_id != asp_key.fingerprint {
bail!("The key was unable to be saved to the database") bail!("The key was unable to be saved to the database")

View file

@ -13,7 +13,7 @@ pub trait AspmSubcommand: Parser + Sync {
panic!("Not implemented") panic!("Not implemented")
} }
fn execute_sync(&self, state: AspmState, runtime: Runtime) -> Result<(), anyhow::Error> { 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))
} }
} }