Skip to content

Commit 78684b4

Browse files
committed
Fix formatting
1 parent 67eadb1 commit 78684b4

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

crates/bitwarden-vault/src/cipher/ssh_key.rs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,21 @@ impl KeyEncryptable<SymmetricCryptoKey, SshKey> for SshKeyView {
4141
impl KeyDecryptable<SymmetricCryptoKey, SshKeyView> for SshKey {
4242
fn decrypt_with_key(&self, key: &SymmetricCryptoKey) -> Result<SshKeyView, CryptoError> {
4343
Ok(SshKeyView {
44-
private_key: Some(self.private_key.clone()).decrypt_with_key(key).ok().flatten().ok_or(CryptoError::MissingField("private_key"))?,
45-
public_key: Some(self.public_key.clone()).decrypt_with_key(key).ok().flatten().ok_or(CryptoError::MissingField("public_key"))?,
46-
fingerprint: Some(self.fingerprint.clone()).decrypt_with_key(key).ok().flatten().ok_or(CryptoError::MissingField("fingerprint"))?,
44+
private_key: Some(self.private_key.clone())
45+
.decrypt_with_key(key)
46+
.ok()
47+
.flatten()
48+
.ok_or(CryptoError::MissingField("private_key"))?,
49+
public_key: Some(self.public_key.clone())
50+
.decrypt_with_key(key)
51+
.ok()
52+
.flatten()
53+
.ok_or(CryptoError::MissingField("public_key"))?,
54+
fingerprint: Some(self.fingerprint.clone())
55+
.decrypt_with_key(key)
56+
.ok()
57+
.flatten()
58+
.ok_or(CryptoError::MissingField("fingerprint"))?,
4759
})
4860
}
4961
}

0 commit comments

Comments
 (0)