Add some comments

master
rasul 5 years ago
parent 551affdb48
commit d915d17bef

@ -1,3 +1,4 @@
/// Unwrap a Result, and log the error.
#[macro_export] #[macro_export]
macro_rules! try_log { macro_rules! try_log {
($e:expr, $($arg:tt)*) => { ($e:expr, $($arg:tt)*) => {
@ -27,7 +28,7 @@ macro_rules! try_print {
}; };
} }
/// Unwrap a Result<T, E>, if it's an error then let client know and return. /// Unwrap a `Result<T, E>`, if it's an error then let client know and return.
#[macro_export] #[macro_export]
macro_rules! try_send_error { macro_rules! try_send_error {
($i:ident, $e:expr) => { ($i:ident, $e:expr) => {
@ -46,6 +47,7 @@ macro_rules! try_send_error {
}; };
} }
/// Unwrap a `Result<Option<T>, E>`, log message if it's error or none
#[macro_export] #[macro_export]
macro_rules! try_option_send_error { macro_rules! try_option_send_error {
($i:ident, $e:expr) => { ($i:ident, $e:expr) => {

Loading…
Cancel
Save