From 78684b4e660f2ed9e68c1dc6fb6d6f7a8a6120f7 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Mon, 28 Oct 2024 15:33:45 +0100 Subject: [PATCH] Fix formatting --- crates/bitwarden-vault/src/cipher/ssh_key.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/crates/bitwarden-vault/src/cipher/ssh_key.rs b/crates/bitwarden-vault/src/cipher/ssh_key.rs index ac0abcb6..b10e23b5 100644 --- a/crates/bitwarden-vault/src/cipher/ssh_key.rs +++ b/crates/bitwarden-vault/src/cipher/ssh_key.rs @@ -41,9 +41,21 @@ impl KeyEncryptable for SshKeyView { impl KeyDecryptable for SshKey { fn decrypt_with_key(&self, key: &SymmetricCryptoKey) -> Result { Ok(SshKeyView { - private_key: Some(self.private_key.clone()).decrypt_with_key(key).ok().flatten().ok_or(CryptoError::MissingField("private_key"))?, - public_key: Some(self.public_key.clone()).decrypt_with_key(key).ok().flatten().ok_or(CryptoError::MissingField("public_key"))?, - fingerprint: Some(self.fingerprint.clone()).decrypt_with_key(key).ok().flatten().ok_or(CryptoError::MissingField("fingerprint"))?, + private_key: Some(self.private_key.clone()) + .decrypt_with_key(key) + .ok() + .flatten() + .ok_or(CryptoError::MissingField("private_key"))?, + public_key: Some(self.public_key.clone()) + .decrypt_with_key(key) + .ok() + .flatten() + .ok_or(CryptoError::MissingField("public_key"))?, + fingerprint: Some(self.fingerprint.clone()) + .decrypt_with_key(key) + .ok() + .flatten() + .ok_or(CryptoError::MissingField("fingerprint"))?, }) } }