chore(qa): format code and configure clippy lints

This commit is contained in:
2026-09-19 10:04:53 +02:00
parent 45572b7370
commit 28a4bb6b70
16 changed files with 157 additions and 109 deletions
+8 -6
View File
@@ -4,9 +4,7 @@ use std::path::Path;
use anyhow::{bail, Context, Result};
use zeroize::Zeroizing;
use crate::crypto::{
decrypt_chunk, FORMAT_VERSION_V1, FORMAT_VERSION_V2, FORMAT_VERSION_V3,
};
use crate::crypto::{decrypt_chunk, FORMAT_VERSION_V1, FORMAT_VERSION_V2, FORMAT_VERSION_V3};
use crate::storage::Database;
/// Bericht über das Ergebnis einer Container-Integritätsprüfung.
@@ -264,7 +262,9 @@ pub fn verify_container(
);
}
Err(e) => {
report.errors.push(format!("Fehler bei der Metadaten-MAC-Prüfung: {e}"));
report
.errors
.push(format!("Fehler bei der Metadaten-MAC-Prüfung: {e}"));
}
}
}
@@ -374,11 +374,13 @@ mod tests {
// 2 Chunks schreiben
let chunk0_data = b"Sample JPEG data header and pixels";
let (ct0, n0, t0) = encrypt_chunk(&dek, file.id, 0, chunk0_data, FORMAT_VERSION, 0).unwrap();
let (ct0, n0, t0) =
encrypt_chunk(&dek, file.id, 0, chunk0_data, FORMAT_VERSION, 0).unwrap();
db.write_chunk(file.id, 0, 0, &n0, &t0, &ct0).unwrap();
let chunk1_data = b"Additional payload data bytes";
let (ct1, n1, t1) = encrypt_chunk(&dek, file.id, 1, chunk1_data, FORMAT_VERSION, 0).unwrap();
let (ct1, n1, t1) =
encrypt_chunk(&dek, file.id, 1, chunk1_data, FORMAT_VERSION, 0).unwrap();
db.write_chunk(file.id, 1, 0, &n1, &t1, &ct1).unwrap();
db.update_node_size_and_time(