Skip to content

Commit deedba9

Browse files
committed
lint
1 parent c2497e6 commit deedba9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

parquet/src/encryption/ciphers.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
//! Encryption implementation specific to Parquet, as described
1919
//! in the [spec](https://github.com/apache/parquet-format/blob/master/Encryption.md).
2020
21+
use ring::aead::{Aad, LessSafeKey, UnboundKey, AES_128_GCM};
2122
use std::collections::HashMap;
2223
use std::sync::Arc;
23-
use ring::aead::{Aad, LessSafeKey, UnboundKey, AES_128_GCM};
2424
// use ring::aead::NonceSequence;
2525
// use ring::rand::{SecureRandom, SystemRandom};
2626
use crate::errors::{ParquetError, Result};
@@ -147,8 +147,7 @@ impl BlockDecryptor for RingGcmBlockDecryptor {
147147
&length_and_ciphertext[SIZE_LEN..SIZE_LEN + NONCE_LEN],
148148
)?;
149149

150-
self.key
151-
.open_in_place(nonce, Aad::from(aad), &mut result)?;
150+
self.key.open_in_place(nonce, Aad::from(aad), &mut result)?;
152151

153152
// Truncate result to remove the tag
154153
result.resize(result.len() - TAG_LEN, 0u8);
@@ -197,7 +196,6 @@ fn create_module_aad(
197196
column_ordinal: usize,
198197
page_ordinal: Option<usize>,
199198
) -> Result<Vec<u8>> {
200-
201199
let module_buf = [module_type as u8];
202200

203201
if module_buf[0] == (ModuleType::Footer as u8) {
@@ -429,7 +427,7 @@ impl CryptoContext {
429427
row_group_ordinal: usize,
430428
column_ordinal: usize,
431429
data_decryptor: Arc<FileDecryptor>,
432-
metadata_decryptor: Arc<FileDecryptor>
430+
metadata_decryptor: Arc<FileDecryptor>,
433431
) -> Self {
434432
Self {
435433
row_group_ordinal,

0 commit comments

Comments
 (0)