Move result structures to a more appropriate location

This commit is contained in:
2022-10-17 08:24:40 +02:00
parent 9162c5eb24
commit 171c88f303
5 changed files with 13 additions and 13 deletions

View File

@ -1,13 +1,4 @@
use std::error::Error;
use std::fmt::Display;
use std::io::ErrorKind;
pub mod network_utils;
pub mod res_utils;
pub mod string_utils;
pub mod time_utils;
pub type Res<E = ()> = Result<E, Box<dyn Error>>;
pub fn boxed_error<D: Display>(msg: D) -> Box<dyn Error> {
Box::new(std::io::Error::new(ErrorKind::Other, msg.to_string()))
}

View File

@ -0,0 +1,9 @@
use std::error::Error;
use std::fmt::Display;
use std::io::ErrorKind;
pub type Res<E = ()> = Result<E, Box<dyn Error>>;
pub fn boxed_error<D: Display>(msg: D) -> Box<dyn Error> {
Box::new(std::io::Error::new(ErrorKind::Other, msg.to_string()))
}