Refactor code for improved readability and consistency
- Simplified error handling in `PostgresApContentQuery` and `SqliteApContentQuery` by aligning the formatting of `try_get` calls. - Removed unnecessary line breaks and improved formatting in various repository implementations for better readability. - Consolidated imports in `lib.rs` and `factory.rs` to maintain a cleaner structure. - Enhanced consistency in async function signatures across multiple files. - Updated test helpers and use cases to streamline code and improve clarity. - Refactored `InMemory` repositories to enhance readability by aligning method implementations.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
#[cfg(feature = "federation")]
|
||||
use domain::testing::PanicRemoteWatchlistRepository;
|
||||
use domain::{
|
||||
ports::{
|
||||
AuthService, DiaryExporter, DiaryRepository, DocumentParser, EventPublisher, ImageStorage,
|
||||
@@ -18,13 +20,8 @@ use domain::{
|
||||
PanicSearchPort, PanicStatsRepository,
|
||||
},
|
||||
};
|
||||
#[cfg(feature = "federation")]
|
||||
use domain::testing::PanicRemoteWatchlistRepository;
|
||||
|
||||
use crate::{
|
||||
config::AppConfig,
|
||||
context::AppContext,
|
||||
};
|
||||
use crate::{config::AppConfig, context::AppContext};
|
||||
|
||||
pub struct TestContextBuilder {
|
||||
pub movie_repo: Arc<dyn MovieRepository>,
|
||||
|
||||
Reference in New Issue
Block a user