Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts committed Nov 28, 2024
1 parent 149fd16 commit 2e0f62f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
10 changes: 2 additions & 8 deletions cala-ledger/src/journal/error.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
use thiserror::Error;

use crate::primitives::JournalId;

#[derive(Error, Debug)]
pub enum JournalError {
#[error("JournalError - Sqlx: {0}")]
Sqlx(#[from] sqlx::Error),
#[error("JournalError - EntityError: {0}")]
EntityError(#[from] crate::entity::EntityError),
#[error("UserError - EsEntityError: {0}")]
#[error("JournalError - EsEntityError: {0}")]
EsEntityError(es_entity::EsEntityError),
#[error("UserError - CursorDestructureError: {0}")]
#[error("JournalError - CursorDestructureError: {0}")]
CursorDestructureError(#[from] es_entity::CursorDestructureError),
#[error("AccountError - NotFound: id '{0}' not found")]
CouldNotFindById(JournalId),
}

es_entity::from_es_entity_error!(JournalError);
2 changes: 0 additions & 2 deletions cala-ledger/src/journal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ mod entity;
pub mod error;
mod repo;

#[cfg(feature = "import")]
use chrono::{DateTime, Utc};
use sqlx::PgPool;
use tracing::instrument;

Expand Down
4 changes: 1 addition & 3 deletions cala-ledger/src/journal/repo.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#[cfg(feature = "import")]
use chrono::{DateTime, Utc};
#[cfg(feature = "import")]
use es_entity::DbOp;
use es_entity::*;
use sqlx::PgPool;

use crate::primitives::DataSourceId;

use super::{error::JournalError, new_entity::*};
use super::{entity::*, error::JournalError};

#[derive(EsRepo, Debug, Clone)]
#[es_repo(
Expand Down

0 comments on commit 2e0f62f

Please sign in to comment.