Skip to content

Commit 5aa3880

Browse files
committed
lint
1 parent 925d93d commit 5aa3880

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

parquet/src/encryption/encrypt.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,18 @@
1717

1818
//! Configuration and utilities for Parquet Modular Encryption
1919
20-
use crate::encryption::ciphers::{BlockEncryptor, RingGcmBlockEncryptor, NONCE_LEN, SIZE_LEN, TAG_LEN};
20+
use crate::encryption::ciphers::{
21+
BlockEncryptor, RingGcmBlockEncryptor, NONCE_LEN, SIZE_LEN, TAG_LEN,
22+
};
2123
use crate::errors::{ParquetError, Result};
2224
use crate::file::column_crypto_metadata::{ColumnCryptoMetaData, EncryptionWithColumnKey};
25+
use crate::format::{AesGcmV1, EncryptionAlgorithm};
2326
use crate::schema::types::{ColumnDescPtr, SchemaDescriptor};
2427
use crate::thrift::TSerializable;
2528
use ring::rand::{SecureRandom, SystemRandom};
2629
use std::collections::{HashMap, HashSet};
2730
use std::io::Write;
2831
use thrift::protocol::TCompactOutputProtocol;
29-
use crate::format::{AesGcmV1, EncryptionAlgorithm};
3032

3133
#[derive(Debug, Clone, PartialEq)]
3234
struct EncryptionKey {
@@ -361,11 +363,12 @@ impl FileEncryptor {
361363
Some(column_key) => Ok(Box::new(RingGcmBlockEncryptor::new(column_key.key())?)),
362364
}
363365
}
364-
366+
365367
/// Get encryption algorithm for the plaintext footer
366368
pub(crate) fn get_footer_encryptor_for_plaintext(&self) -> Result<Option<EncryptionAlgorithm>> {
367369
if !self.properties.encrypt_footer() {
368-
let supply_aad_prefix = self.properties
370+
let supply_aad_prefix = self
371+
.properties
369372
.aad_prefix()
370373
.map(|_| !self.properties.store_aad_prefix());
371374
let encryption_algorithm = Some(EncryptionAlgorithm::AESGCMV1(AesGcmV1 {

parquet/src/file/metadata/writer.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717

1818
#[cfg(feature = "encryption")]
1919
use crate::encryption::{
20-
encrypt::{encrypt_object, encrypt_object_to_vec, write_signed_plaintext_object, FileEncryptor},
20+
encrypt::{
21+
encrypt_object, encrypt_object_to_vec, write_signed_plaintext_object, FileEncryptor,
22+
},
2123
modules::{create_footer_aad, create_module_aad, ModuleType},
2224
};
2325
#[cfg(feature = "encryption")]

0 commit comments

Comments
 (0)