From 81d10c3b374eaa345fc44dea3265cdb07d10acf7 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 24 Nov 2020 08:03:00 +0100 Subject: [PATCH] cleanup: remove dead code --- src/backup/key_derivation.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/backup/key_derivation.rs b/src/backup/key_derivation.rs index 1a5bc250..046a8c8f 100644 --- a/src/backup/key_derivation.rs +++ b/src/backup/key_derivation.rs @@ -187,16 +187,9 @@ pub fn encrypt_key_with_passphrase( pub fn load_and_decrypt_key( path: &std::path::Path, passphrase: &dyn Fn() -> Result, Error>, -) -> Result<([u8;32], i64, Fingerprint), Error> { - do_load_and_decrypt_key(path, passphrase) - .with_context(|| format!("failed to load decryption key from {:?}", path)) -} - -fn do_load_and_decrypt_key( - path: &std::path::Path, - passphrase: &dyn Fn() -> Result, Error>, ) -> Result<([u8;32], i64, Fingerprint), Error> { decrypt_key(&file_get_contents(&path)?, passphrase) + .with_context(|| format!("failed to load decryption key from {:?}", path)) } pub fn decrypt_key(