style: apply cargo fmt to entire codebase

Standardize code formatting across all 173 Rust source files
using rustfmt. No functional changes - purely cosmetic.

This establishes a consistent code style baseline for the
project going forward.
This commit is contained in:
Dionisio
2026-02-14 01:29:34 +01:00
parent 67137a3ef2
commit 4c98c5a657
173 changed files with 23368 additions and 17590 deletions
+12 -12
View File
@@ -1,8 +1,8 @@
use std::path::PathBuf;
use async_trait::async_trait;
use std::path::PathBuf;
use crate::domain::services::path_service::StoragePath;
use crate::common::errors::DomainError;
use crate::domain::services::path_service::StoragePath;
// Re-export domain repository traits for backward compatibility
pub use crate::domain::repositories::folder_repository::FolderRepository;
@@ -14,13 +14,13 @@ use super::storage_ports::{FileReadPort, FileWritePort};
pub trait StoragePort: Send + Sync + 'static {
/// Resolves a domain path to a physical path
fn resolve_path(&self, storage_path: &StoragePath) -> PathBuf;
/// Creates directories if they don't exist
async fn ensure_directory(&self, storage_path: &StoragePath) -> Result<(), DomainError>;
/// Checks if a file exists at the given path
async fn file_exists(&self, storage_path: &StoragePath) -> Result<bool, DomainError>;
/// Checks if a directory exists at the given path
async fn directory_exists(&self, storage_path: &StoragePath) -> Result<bool, DomainError>;
}
@@ -54,28 +54,28 @@ impl<T: FolderRepository> FolderStoragePort for T {}
pub trait IdMappingPort: Send + Sync + 'static {
/// Gets or creates an ID for a path
async fn get_or_create_id(&self, path: &StoragePath) -> Result<String, DomainError>;
/// Gets a path by its ID
async fn get_path_by_id(&self, id: &str) -> Result<StoragePath, DomainError>;
/// Updates the path for an existing ID
async fn update_path(&self, id: &str, new_path: &StoragePath) -> Result<(), DomainError>;
/// Removes an ID from the mapping
async fn remove_id(&self, id: &str) -> Result<(), DomainError>;
/// Saves pending changes
async fn save_changes(&self) -> Result<(), DomainError>;
/// Gets the file path as a PathBuf
async fn get_file_path(&self, file_id: &str) -> Result<PathBuf, DomainError> {
let storage_path = self.get_path_by_id(file_id).await?;
Ok(PathBuf::from(storage_path.to_string()))
}
/// Updates a file's path
async fn update_file_path(&self, file_id: &str, new_path: &PathBuf) -> Result<(), DomainError> {
let storage_path = StoragePath::from_string(new_path.to_string_lossy().as_ref());
self.update_path(file_id, &storage_path).await
}
}
}