• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lennart-k / rustical / #30

02 Nov 2025 12:10PM UTC coverage: 15.086% (-0.05%) from 15.131%
#30

push

lennart-k
merge main into feature/comp-filter

65 of 451 new or added lines in 80 files covered. (14.41%)

19 existing lines in 17 files now uncovered.

657 of 4355 relevant lines covered (15.09%)

0.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/crates/store_sqlite/src/error.rs
1
use tracing::warn;
2

3
#[derive(Debug, thiserror::Error)]
4
pub enum Error {
5
    #[error(transparent)]
6
    SqlxError(sqlx::Error),
7

8
    #[error(transparent)]
9
    StoreError(rustical_store::Error),
10

11
    #[error(transparent)]
12
    IcalError(#[from] rustical_ical::Error),
13
}
14

15
impl From<sqlx::Error> for Error {
16
    fn from(value: sqlx::Error) -> Self {
×
17
        match value {
×
NEW
18
            sqlx::Error::RowNotFound => Self::StoreError(rustical_store::Error::NotFound),
×
19
            sqlx::Error::Database(err) => {
×
20
                if err.is_unique_violation() {
×
21
                    warn!("{err:?}");
×
NEW
22
                    Self::StoreError(rustical_store::Error::AlreadyExists)
×
23
                } else {
NEW
24
                    Self::SqlxError(sqlx::Error::Database(err))
×
25
                }
26
            }
NEW
27
            err => Self::SqlxError(err),
×
28
        }
29
    }
30
}
31

32
impl From<Error> for rustical_store::Error {
33
    fn from(value: Error) -> Self {
×
34
        match value {
×
35
            Error::SqlxError(err) => Self::Other(err.into()),
×
36
            Error::IcalError(err) => Self::Other(err.into()),
×
37
            Error::StoreError(err) => err,
×
38
        }
39
    }
40
}
41

42
impl From<rustical_store::Error> for Error {
43
    fn from(value: rustical_store::Error) -> Self {
×
44
        Self::StoreError(value)
×
45
    }
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc