mirror of
https://github.com/jht5945/rust_util.git
synced 2025-12-29 08:30:04 +08:00
add new_box_ioerror
This commit is contained in:
@@ -126,6 +126,10 @@ pub fn new_box_error(m: &str) -> Box<dyn std::error::Error> {
|
|||||||
Box::new(Error::new(ErrorKind::Other, m))
|
Box::new(Error::new(ErrorKind::Other, m))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn new_box_ioerror(m: &str) -> Box<dyn std::error::Error> {
|
||||||
|
Box::new(Error::new(ErrorKind::Other, m))
|
||||||
|
}
|
||||||
|
|
||||||
pub enum MessageType { INFO, OK, WARN, ERROR, }
|
pub enum MessageType { INFO, OK, WARN, ERROR, }
|
||||||
|
|
||||||
pub fn print_color(color: Option<term::color::Color>, is_bold: bool, m: &str) {
|
pub fn print_color(color: Option<term::color::Color>, is_bold: bool, m: &str) {
|
||||||
|
|||||||
Reference in New Issue
Block a user