1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
    Appellation: errors <module>
    Contrib: FL03 <jo3mccain@icloud.com>
*/
//! # Errors
//!
//!
pub use self::{error::*, kinds::*};

pub(crate) mod error;
pub(crate) mod kinds;

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_error() {
        let msg = "test";
        let err = Error::new(ErrorKind::custom("custom".to_string()), msg.to_string());
        assert_eq!(err.kind(), &ErrorKind::custom("custom".to_string()));
        assert_eq!(
            Error::from(anyhow::anyhow!("")).kind(),
            &ErrorKind::unknown()
        );
    }
}