clippy-fixes
Some checks failed
Deploy / deploy (push) Has been skipped
CI / lint (push) Failing after 1m53s
CI / test (push) Failing after 1m58s

This commit is contained in:
2025-08-12 14:13:35 +03:00
parent a4c2825f8a
commit 31053db4a2
10 changed files with 23 additions and 42 deletions

View File

@@ -16,7 +16,6 @@ pub struct AppState {
const PATH_MAPPING_KEY: &str = "filepath_mapping"; // Ключ для хранения маппинга путей
// Убираем TTL для квоты - она должна быть постоянной на пользователя
const QUOTA_TTL: u64 = 0; // 0 означает отсутствие TTL
impl AppState {
/// Инициализация нового состояния приложения.
@@ -100,7 +99,7 @@ impl AppState {
let _: () = redis
.hset(PATH_MAPPING_KEY, filename.clone(), filepath)
.await
.expect(&format!("Failed to cache file {} in Redis", filename));
.unwrap();
}
warn!("cached {} files", filelist.len());
@@ -121,7 +120,7 @@ impl AppState {
let _: () = redis
.hset(PATH_MAPPING_KEY, filename, filepath)
.await
.expect(&format!("Failed to cache file {} in Redis", filename));
.unwrap_or_else(|_| panic!("Failed to cache file {} in Redis", filename));
}
/// создает или получает текущее значение квоты пользователя