housekeeping(server): fixed clippy warns
Some checks failed
ci/woodpecker/pr/server-audit Pipeline was successful
ci/woodpecker/pr/server-vet Pipeline failed
ci/woodpecker/pr/server-lint Pipeline failed
ci/woodpecker/pr/server-test Pipeline failed
ci/woodpecker/pr/useragent-analyze Pipeline failed

This commit is contained in:
hdbg
2026-04-04 14:33:20 +02:00
parent 4a50daa7ea
commit 01b12515bd
27 changed files with 114 additions and 96 deletions

View File

@@ -5,9 +5,12 @@ use chacha20poly1305::{
AeadInPlace, Key, KeyInit as _, XChaCha20Poly1305, XNonce,
aead::{AeadMut, Error, Payload},
};
use rand::{Rng as _, SeedableRng as _, rngs::{StdRng, SysRng}};
use rand::{
Rng as _, SeedableRng as _,
rngs::{StdRng, SysRng},
};
use crate::{safe_cell::{SafeCell, SafeCellHandle as _}};
use crate::safe_cell::{SafeCell, SafeCellHandle as _};
pub mod encryption;
pub mod integrity;
@@ -124,8 +127,11 @@ pub fn derive_key(mut password: SafeCell<Vec<u8>>, salt: &Salt) -> KeyCell {
#[cfg(test)]
mod tests {
use crate::{safe_cell::{SafeCell, SafeCellHandle as _}};
use super::{derive_key, encryption::v1::{Nonce, generate_salt}};
use super::{
derive_key,
encryption::v1::{Nonce, generate_salt},
};
use crate::safe_cell::{SafeCell, SafeCellHandle as _};
#[test]
pub fn encrypt_decrypt() {
@@ -150,4 +156,4 @@ mod tests {
let buffer = buffer.read();
assert_eq!(*buffer, b"secret data");
}
}
}