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
+3 -1
View File
@@ -376,13 +376,14 @@ impl SyncEngine {
}
/// Open a .cloud placeholder file: download the real file, rename, return path
#[allow(dead_code)]
pub async fn open_cloud_file(&self, cloud_path: &Path) -> Result<PathBuf, String> {
let content = std::fs::read_to_string(cloud_path)
.map_err(|e| format!("Platzhalter lesen: {}", e))?;
let placeholder: CloudPlaceholder = serde_json::from_str(&content)
.map_err(|e| format!("Platzhalter ungueltig: {}", e))?;
let real_path = cloud_path.with_extension("");
let _real_path = cloud_path.with_extension("");
// Remove .cloud extension to get real filename
let real_path = cloud_path.parent().unwrap().join(&placeholder.name);
@@ -399,6 +400,7 @@ impl SyncEngine {
}
/// Close a previously opened file: sync back, recreate .cloud, unlock
#[allow(dead_code)]
pub async fn close_cloud_file(&self, real_path: &Path, file_id: i64) -> Result<(), String> {
// Upload changes
// We need the parent_id - for now upload to the same location