1
0
mirror of https://github.com/jht5945/rust_util.git synced 2025-12-27 15:40:03 +08:00
Files
rust_util/src/lib.rs
2019-08-15 07:12:51 +08:00

24 lines
475 B
Rust

extern crate term;
use std::{
io::{Error, ErrorKind},
};
pub mod util_io;
pub mod util_os;
pub mod util_env;
pub mod util_cmd;
pub mod util_msg;
pub mod util_size;
pub mod util_file;
pub type XResult<T> = Result<T, Box<dyn std::error::Error>>;
pub fn new_box_error(m: &str) -> Box<dyn std::error::Error> {
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))
}