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

payjoin / rust-payjoin / 13203104215

07 Feb 2025 03:39PM UTC coverage: 79.049% (-0.03%) from 79.08%
13203104215

Pull #532

github

web-flow
Merge 1a56abb6c into cef3d5287
Pull Request #532: Fix payjoin-cli v1 coverage

14 of 15 new or added lines in 2 files covered. (93.33%)

4 existing lines in 2 files now uncovered.

4022 of 5088 relevant lines covered (79.05%)

904.07 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
}
17

18
impl fmt::Display for Error {
19
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
×
20
        match self {
×
21
            Error::Sled(e) => write!(f, "Database operation failed: {}", e),
×
UNCOV
22
            #[cfg(feature = "v2")]
×
23
            Error::Serialize(e) => write!(f, "Serialization failed: {}", e),
×
UNCOV
24
            #[cfg(feature = "v2")]
×
25
            Error::Deserialize(e) => write!(f, "Deserialization failed: {}", e),
×
UNCOV
26
        }
×
27
    }
×
28
}
29

30
impl std::error::Error for Error {}
31

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