Skip to content

Commit 2aa93d0

Browse files
committed
fmt
1 parent 413d8fd commit 2aa93d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/storable_builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pub struct StorableBuilder {
1616
const CHACHA20_CIPHER_NAME: &'static str = "ChaCha20Poly1305";
1717

1818
impl StorableBuilder {
19-
2019
/// Creates a [`Storable`] that can be serialized and stored as `value` in [`PutObjectRequest`].
2120
///
2221
/// Uses ChaCha20 for encrypting the `input` and Poly1305 for generating mac/tag.
@@ -55,7 +54,8 @@ impl StorableBuilder {
5554
let mut cipher = ChaCha20Poly1305::new(&self.data_encryption_key, &encryption_metadata.nonce, &[]);
5655

5756
if cipher.decrypt_inplace(&mut storable.data, encryption_metadata.tag.borrow()) {
58-
let data_blob = PlaintextBlob::decode(&storable.data[..]).map_err(|e| Error::new(ErrorKind::InvalidData, e))?;
57+
let data_blob =
58+
PlaintextBlob::decode(&storable.data[..]).map_err(|e| Error::new(ErrorKind::InvalidData, e))?;
5959
Ok((data_blob.value, data_blob.version))
6060
} else {
6161
Err(Error::new(ErrorKind::InvalidData, "Invalid Tag"))

0 commit comments

Comments
 (0)