rsv_lib/utils/
cli_result.rs1use crate::utils::util::werr_exit;
2pub type CliResult = Result<(), Box<dyn std::error::Error>>;
3
4pub trait E {
5 fn handle_err(&self) {}
6}
7
8impl E for CliResult {
9 fn handle_err(&self) {
10 match self {
11 Ok(_) => {}
12 Err(msg) => {
13 werr_exit!("Error: {}", msg);
14 }
15 }
16 }
17}