Skip to content

Commit 7358ee6

Browse files
committed
Cargo fmt
1 parent 0d9fc0e commit 7358ee6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/bitwarden-crypto/src/enc_string/symmetric.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ impl EncString {
243243
let mut protected_header = coset::HeaderBuilder::new();
244244
match content_format {
245245
ContentFormat::Utf8 => {
246-
protected_header = protected_header.content_type("application/utf8-padded".to_string());
246+
protected_header =
247+
protected_header.content_type("application/utf8-padded".to_string());
247248
}
248249
ContentFormat::Pkcs8 => {
249250
protected_header = protected_header.content_format(CoapContentFormat::Pkcs8);
@@ -258,7 +259,7 @@ impl EncString {
258259
ContentFormat::DomainObject => unreachable!(),
259260
}
260261

261-
let mut data = data_dec.to_vec();
262+
let mut data = data_dec.to_vec();
262263
if content_format != ContentFormat::Utf8 {
263264
// Pad the data to a block size in order to hide plaintext length
264265
pad_bytes(&mut data, Self::XCHACHA20_TEXT_PAD_BLOCK_SIZE);
@@ -359,7 +360,7 @@ impl KeyDecryptable<SymmetricCryptoKey, Vec<u8>> for EncString {
359360
if content_type == "application/utf8-padded" {
360361
decrypted_message = unpad_bytes(&decrypted_message.as_slice()).to_vec();
361362
} else {
362-
return Err(CryptoError::EncodingError)
363+
return Err(CryptoError::EncodingError);
363364
}
364365
}
365366
_ => {}

0 commit comments

Comments
 (0)