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

payjoin / rust-payjoin / 15642374656

13 Jun 2025 07:22PM UTC coverage: 84.642% (-1.4%) from 86.035%
15642374656

Pull #768

github

web-flow
Merge 605fdfd6b into be0597869
Pull Request #768: Add PartialEq/Eq to errors for easier comparison

22 of 162 new or added lines in 13 files covered. (13.58%)

304 existing lines in 9 files now uncovered.

7137 of 8432 relevant lines covered (84.64%)

550.77 hits per line

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

18.52
/payjoin/src/core/error.rs
1
use std::{error, fmt};
2

3
use crate::receive::OutputSubstitutionError;
4

5
#[derive(Debug)]
6
pub struct ImplementationError(Box<dyn error::Error + Send + Sync>);
7

8
impl ImplementationError {
NEW
9
    pub fn new(e: impl error::Error + Send + Sync + 'static) -> Self {
×
NEW
10
        ImplementationError(Box::new(e))
×
NEW
11
    }
×
12
}
13

14
impl fmt::Display for ImplementationError {
NEW
15
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.0.fmt(f) }
×
16
}
17

18
impl error::Error for ImplementationError {
NEW
19
    fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(self.0.as_ref()) }
×
20
}
21

22
impl PartialEq for ImplementationError {
NEW
23
    fn eq(&self, _: &Self) -> bool { false }
×
24
}
25

26
impl Eq for ImplementationError {}
27

28
impl From<Box<dyn error::Error + Send + Sync>> for ImplementationError {
29
    fn from(e: Box<dyn error::Error + Send + Sync>) -> Self { ImplementationError(e) }
16✔
30
}
31

32
impl From<String> for ImplementationError {
NEW
33
    fn from(e: String) -> Self {
×
NEW
34
        let error = Box::<dyn error::Error + Send + Sync>::from(e);
×
NEW
35
        ImplementationError::from(error)
×
NEW
36
    }
×
37
}
38

39
impl From<&str> for ImplementationError {
40
    fn from(e: &str) -> Self {
16✔
41
        let error = Box::<dyn error::Error + Send + Sync>::from(e);
16✔
42
        ImplementationError::from(error)
16✔
43
    }
16✔
44
}
45

46
impl From<anyhow::Error> for ImplementationError {
NEW
47
    fn from(e: anyhow::Error) -> Self {
×
NEW
48
        let error = Box::<dyn error::Error + Send + Sync>::from(e);
×
NEW
49
        ImplementationError::from(error)
×
NEW
50
    }
×
51
}
52

53
impl From<bitcoin::address::FromScriptError> for ImplementationError {
NEW
54
    fn from(e: bitcoin::address::FromScriptError) -> Self {
×
NEW
55
        let error = Box::<dyn error::Error + Send + Sync>::from(e);
×
NEW
56
        ImplementationError::from(error)
×
NEW
57
    }
×
58
}
59

60
impl From<OutputSubstitutionError> for ImplementationError {
NEW
61
    fn from(e: OutputSubstitutionError) -> Self {
×
NEW
62
        let error = Box::<dyn error::Error + Send + Sync>::from(e);
×
NEW
63
        ImplementationError::from(error)
×
NEW
64
    }
×
65
}
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