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

payjoin / rust-payjoin / 15665312525

15 Jun 2025 04:45PM UTC coverage: 85.876% (-0.2%) from 86.047%
15665312525

Pull #750

github

web-flow
Merge 19031f1b0 into 910f32e7e
Pull Request #750: Replace `Persister` with `SessionPersister` for `v2::Receiver`

901 of 1057 new or added lines in 9 files covered. (85.24%)

10 existing lines in 4 files now uncovered.

7740 of 9013 relevant lines covered (85.88%)

516.21 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
#[cfg(feature = "v2")]
4
use bitcoincore_rpc::jsonrpc::serde_json;
5
use sled::Error as SledError;
6

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

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

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

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

40
impl From<SledError> for Error {
41
    fn from(error: SledError) -> Self { Error::Sled(error) }
×
42
}
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