fix: Alle Rust-Warnings bereinigt

- unused variables: Underscore-Prefix (_real_path, _had_changes, _file_id)
- dead_code: #[allow(dead_code)] fuer zukuenftige Methoden
  (open_cloud_file, close_cloud_file, get_changes, LockResponse, SyncChangesResponse)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Hacker
2026-04-12 02:02:53 +02:00
parent 0d1fc67287
commit a445256d86
3 changed files with 10 additions and 5 deletions
+4 -4
View File
@@ -19,7 +19,7 @@ use std::collections::HashMap;
/// Tracks a file opened from a .cloud placeholder
#[derive(Clone, Debug)]
struct OpenedFile {
file_id: i64,
_file_id: i64,
real_path: PathBuf,
cloud_name: String, // original .cloud filename
}
@@ -255,7 +255,7 @@ async fn open_cloud_file(state: State<'_, AppState>, cloud_path: String) -> Resu
// Track opened file for auto-close detection
state.opened_files.lock().unwrap().insert(file_id, OpenedFile {
file_id,
_file_id: file_id,
real_path: real_path.clone(),
cloud_name: path.file_name().unwrap().to_string_lossy().to_string(),
});
@@ -592,7 +592,7 @@ fn start_background_sync(
let state = app_w.state::<AppState>();
let watchers = state.watchers.lock().unwrap();
let mut had_changes = false;
let mut _had_changes = false;
for watcher in watchers.iter() {
while let Ok(change) = watcher.receiver.try_recv() {
@@ -608,7 +608,7 @@ fn start_background_sync(
ChangeKind::Deleted => format!("Geloescht: {}", name),
};
let _ = app_w.emit("file-change", msg);
had_changes = true;
_had_changes = true;
last_change = std::time::Instant::now();
pending = true;
}