easy_err/lib.rs
//! 一个简易的错误包装器
mod err;
pub use err::Error;
#[cfg(test)]
mod test{
use crate::Error;
#[test]
fn test() {
let custom_err1 = Error::custom("Here is a custom error1.");
let custom_err2 = Error::custom("Here is a custom error2.");
custom_err1.log_to("./log.txt");
custom_err2.log_to("./log.txt");
}
}