diff --git a/core/chart-of-accounts/src/chart_of_accounts/entity.rs b/core/chart-of-accounts/src/chart_of_accounts/entity.rs index e5fe1dc84..b757f9069 100644 --- a/core/chart-of-accounts/src/chart_of_accounts/entity.rs +++ b/core/chart-of-accounts/src/chart_of_accounts/entity.rs @@ -89,7 +89,10 @@ impl ChartOfAccount { reference: String, audit_info: AuditInfo, ) -> Result { - if let Some(_) = self.find_control_account_by_reference(reference.to_string()) { + if self + .find_control_account_by_reference(reference.to_string()) + .is_some() + { return Err(ChartOfAccountError::ControlAccountAlreadyRegistered( reference, )); @@ -145,7 +148,10 @@ impl ChartOfAccount { reference: String, audit_info: AuditInfo, ) -> Result { - if let Some(_) = self.find_control_sub_account_by_reference(reference.to_string()) { + if self + .find_control_sub_account_by_reference(reference.to_string()) + .is_some() + { return Err(ChartOfAccountError::ControlSubAccountAlreadyRegistered( reference, )); diff --git a/lana/app/src/accounting_init/mod.rs b/lana/app/src/accounting_init/mod.rs index f911b66a0..809aee19e 100644 --- a/lana/app/src/accounting_init/mod.rs +++ b/lana/app/src/accounting_init/mod.rs @@ -22,6 +22,6 @@ impl AccountingInit { cala: &CalaLedger, chart_of_accounts: &ChartOfAccounts, ) -> Result { - Ok(seed::execute(cala, chart_of_accounts).await?) + seed::execute(cala, chart_of_accounts).await } }