Remove module-wide dead_code allows, annotate individual items instead

This commit is contained in:
lashman
2026-02-27 21:05:56 +02:00
parent c9f032292a
commit f87403794e
4 changed files with 9 additions and 9 deletions

View File

@@ -1,5 +1,3 @@
#![allow(dead_code)]
use std::fs;
use std::io::Read;
use std::path::{Path, PathBuf};
@@ -271,6 +269,7 @@ pub fn delete_backup(db: &Database, backup_id: i64) -> Result<(), BackupError> {
}
/// Remove backups older than the specified number of days.
#[allow(dead_code)]
pub fn auto_cleanup_old_backups(db: &Database, retention_days: u32) -> Result<u32, BackupError> {
let backups = db.get_all_config_backups().unwrap_or_default();
let cutoff = chrono::Utc::now() - chrono::Duration::days(retention_days as i64);
@@ -293,6 +292,7 @@ pub fn auto_cleanup_old_backups(db: &Database, retention_days: u32) -> Result<u3
#[derive(Debug)]
pub struct BackupInfo {
pub id: i64,
#[allow(dead_code)]
pub appimage_id: i64,
pub app_version: Option<String>,
pub archive_path: String,
@@ -304,8 +304,10 @@ pub struct BackupInfo {
#[derive(Debug)]
pub struct RestoreResult {
#[allow(dead_code)]
pub manifest: BackupManifest,
pub paths_restored: u32,
#[allow(dead_code)]
pub paths_skipped: u32,
}