somehow/
lib.rs

1pub type Error = Box<dyn std::error::Error + Send + Sync + 'static>;
2/*
3#[derive(Debug)]
4pub struct Error;
5
6/// automatic conversion from `std::error::Error` trait
7///
8/// https://doc.rust-lang.org/nightly/std/error/trait.Error.html
9
10impl From<Box<dyn std::error::Error>> for Error
11where
12{
13    fn from(_e: Box<dyn std::error::Error>) -> Self {
14        Error
15    }
16}
17
18impl<E> From<E> for Error
19where
20    E: std::error::Error + Sync + Send + Sized + 'static,
21{
22    fn from(_e: E) -> Self {
23        Error
24    }
25}
26*/
27
28#[cfg(test)]
29mod tests {
30    #[test]
31    fn it_works() {
32        let result = 2 + 2;
33        assert_eq!(result, 4);
34    }
35}