1
0
mirror of https://github.com/jht5945/rust_util.git synced 2025-12-27 07:30:05 +08:00

style: opt_value style

This commit is contained in:
2020-11-15 22:15:00 +08:00
parent 6b4f7bf3ef
commit 807bf490fb

View File

@@ -35,9 +35,7 @@ pub mod util_net;
($($arg:tt)+) => ( rust_util::util_msg::print_debug(&format!($($arg)+)); )
}
#[macro_export] macro_rules! opt_value {
($e: expr) => {
match $e { Some(o) => o, None => return, }
}
($e: expr) => ( match $e { Some(o) => o, None => return, } )
}
pub type XResult<T> = Result<T, Box<dyn std::error::Error>>;