From 487138a0245bf676e54d2c4d312704fbebd80835 Mon Sep 17 00:00:00 2001 From: Jisu-Woniu <31986081+Jisu-Woniu@users.noreply.github.com> Date: Sat, 11 Nov 2023 15:45:05 +0800 Subject: [PATCH] fix: :rotating_light: Remove unused `use` and rebundant closure. --- src-tauri/crypto/src/keygen.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/crypto/src/keygen.rs b/src-tauri/crypto/src/keygen.rs index de894cc..0d1a6d4 100644 --- a/src-tauri/crypto/src/keygen.rs +++ b/src-tauri/crypto/src/keygen.rs @@ -6,7 +6,7 @@ use pgp::{ types::{CompressionAlgorithm, KeyTrait, SecretKeyTrait as _}, KeyType, SecretKeyParamsBuilder, SignedPublicKey, SignedSecretKey, }; -use smallvec::{smallvec, SmallVec}; +use smallvec::smallvec; use tokio::{ fs::{self, DirBuilder}, try_join, @@ -64,7 +64,7 @@ fn gen_key_pair(name: &str, email: &str) -> Result<(SignedSecretKey, SignedPubli .expect("msg") .generate() .expect("Failed to generate a plain key."); - let passwd_fn = || String::new(); + let passwd_fn = String::new; let signed_secret_key = secret_key.sign(passwd_fn)?; let public_key = signed_secret_key.public_key(); let signed_public_key = public_key.sign(&signed_secret_key, passwd_fn)?;