|
|
|
@ -14,14 +14,6 @@ use log::error;
|
|
|
|
|
/// ```
|
|
|
|
|
pub type RudeResult<T> = Result<T, Box<dyn Error>>;
|
|
|
|
|
|
|
|
|
|
/// Wrap `?` with an error message into the log.
|
|
|
|
|
/*pub fn try_log<T, E: Into<Box<dyn Error>>, S: Into<String>>(
|
|
|
|
|
result: Result<T, E>,
|
|
|
|
|
message: S,
|
|
|
|
|
) -> RudeResult<T> {
|
|
|
|
|
try_error(result, message, true)
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
/// Wrap `?` with an error message to stdout.
|
|
|
|
|
pub fn try_print<T, E: Into<Box<dyn Error>>, S: Into<String>>(
|
|
|
|
|
result: Result<T, E>,
|
|
|
|
|