fix: remove unused watch_event_query binding, prefix dead field for clippy -D warnings

This commit is contained in:
2026-07-10 04:32:54 +02:00
parent 2e32847129
commit 5266646b0b
20 changed files with 79 additions and 69 deletions

View File

@@ -1,15 +1,8 @@
use domain::{
errors::DomainError,
events::DomainEvent,
value_objects::UserId,
};
use domain::{errors::DomainError, events::DomainEvent, value_objects::UserId};
use super::{commands::DeleteGoalCommand, deps::GoalCommandDeps};
pub async fn execute(
deps: &GoalCommandDeps,
cmd: DeleteGoalCommand,
) -> Result<(), DomainError> {
pub async fn execute(deps: &GoalCommandDeps, cmd: DeleteGoalCommand) -> Result<(), DomainError> {
let user_id = UserId::from_uuid(cmd.user_id);
let g = deps

View File

@@ -1,8 +1,4 @@
use domain::{
errors::DomainError,
models::GoalWithProgress,
value_objects::UserId,
};
use domain::{errors::DomainError, models::GoalWithProgress, value_objects::UserId};
use super::{deps::GoalQueryDeps, queries::GetGoalQuery};
@@ -12,11 +8,17 @@ pub async fn execute(
) -> Result<Option<GoalWithProgress>, DomainError> {
let user_id = UserId::from_uuid(query.user_id);
let found = deps.goal.find_by_user_and_year(&user_id, query.year).await?;
let found = deps
.goal
.find_by_user_and_year(&user_id, query.year)
.await?;
let Some(g) = found else { return Ok(None) };
let current_count = deps.stats.count_reviews_in_year(&user_id, query.year).await?;
let current_count = deps
.stats
.count_reviews_in_year(&user_id, query.year)
.await?;
Ok(Some(GoalWithProgress {
goal: g,

View File

@@ -1,8 +1,4 @@
use domain::{
errors::DomainError,
models::GoalWithProgress,
value_objects::UserId,
};
use domain::{errors::DomainError, models::GoalWithProgress, value_objects::UserId};
use super::{deps::GoalQueryDeps, queries::ListGoalsQuery};

View File

@@ -1,8 +1,5 @@
use domain::{
errors::DomainError,
events::DomainEvent,
models::GoalWithProgress,
value_objects::UserId,
errors::DomainError, events::DomainEvent, models::GoalWithProgress, value_objects::UserId,
};
use super::{commands::UpdateGoalCommand, deps::GoalCommandDeps};