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

payjoin / rust-payjoin / 16973355650

14 Aug 2025 06:22PM UTC coverage: 86.233%. First build
16973355650

Pull #945

github

web-flow
Merge 70d55fd16 into ae57a924b
Pull Request #945: Replace bitcoincore-rpc with custom reqwest client

245 of 283 new or added lines in 7 files covered. (86.57%)

7717 of 8949 relevant lines covered (86.23%)

520.98 hits per line

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

0.0
/payjoin-cli/src/db/error.rs
1
use std::fmt;
2

3
use payjoin::ImplementationError;
4
use sled::Error as SledError;
5

6
pub(crate) type Result<T> = std::result::Result<T, Error>;
7

8
#[derive(Debug)]
9
pub(crate) enum Error {
10
    Sled(SledError),
11
    #[cfg(feature = "v2")]
12
    Serialize(serde_json::Error),
13
    #[cfg(feature = "v2")]
14
    Deserialize(serde_json::Error),
15
    #[cfg(feature = "v2")]
16
    NotFound(String),
17
    #[cfg(feature = "v2")]
18
    TryFromSlice(std::array::TryFromSliceError),
19
}
20

21
impl fmt::Display for Error {
22
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
×
23
        match self {
×
24
            Error::Sled(e) => write!(f, "Database operation failed: {e}"),
×
25
            #[cfg(feature = "v2")]
26
            Error::Serialize(e) => write!(f, "Serialization failed: {e}"),
×
27
            #[cfg(feature = "v2")]
28
            Error::Deserialize(e) => write!(f, "Deserialization failed: {e}"),
×
29
            #[cfg(feature = "v2")]
30
            Error::NotFound(key) => write!(f, "Key not found: {key}"),
×
31
            #[cfg(feature = "v2")]
32
            Error::TryFromSlice(e) => write!(f, "TryFromSlice failed: {e}"),
×
33
        }
34
    }
×
35
}
36

37
impl std::error::Error for Error {}
38

39
impl From<SledError> for Error {
NEW
40
    fn from(error: SledError) -> Self {
×
NEW
41
        Error::Sled(error)
×
NEW
42
    }
×
43
}
44

45
impl From<Error> for ImplementationError {
NEW
46
    fn from(error: Error) -> Self {
×
NEW
47
        ImplementationError::new(error)
×
NEW
48
    }
×
49
}
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