diff --git a/src/lib.rs b/src/lib.rs index 93384e7..6cbbddc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,6 +57,10 @@ pub fn get_absolute_path(path: &str) -> Option { fs::canonicalize(path).ok() } +pub fn new_box_error(m: &str) -> Box { + Box::new(Error::new(ErrorKind::Other, m)) +} + pub enum MessageType { INFO, OK, WARN, ERROR, } pub fn print_message_ex(color: Option, h: &str, message: &str) {