Skip to content

Commit 4587197

Browse files
committed
refactor(wal): replace deprecated GenericArray with .into() for nonce construction
1 parent ec82616 commit 4587197

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

nodedb-wal/src/crypto.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
//! `payload_len` includes the 16-byte auth tag.
1515
1616
use aes_gcm::Aes256Gcm;
17-
use aes_gcm::aead::generic_array::GenericArray;
1817
use aes_gcm::aead::{Aead, KeyInit};
1918

2019
use crate::error::{Result, WalError};
@@ -192,7 +191,7 @@ pub const AUTH_TAG_SIZE: usize = 16;
192191
fn lsn_to_nonce(lsn: u64) -> aes_gcm::Nonce<aes_gcm::aead::consts::U12> {
193192
let mut nonce_bytes = [0u8; 12];
194193
nonce_bytes[..8].copy_from_slice(&lsn.to_le_bytes());
195-
*GenericArray::from_slice(&nonce_bytes)
194+
nonce_bytes.into()
196195
}
197196

198197
#[cfg(test)]

0 commit comments

Comments
 (0)