From d915d17befd2e60ffb1a4569afd4d0250e870787 Mon Sep 17 00:00:00 2001 From: rasul Date: Fri, 3 Apr 2020 18:51:19 -0500 Subject: [PATCH] Add some comments --- src/macros.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/macros.rs b/src/macros.rs index 44facf8..c3147b2 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -1,3 +1,4 @@ +/// Unwrap a Result, and log the error. #[macro_export] macro_rules! try_log { ($e:expr, $($arg:tt)*) => { @@ -27,7 +28,7 @@ macro_rules! try_print { }; } -/// Unwrap a Result, if it's an error then let client know and return. +/// Unwrap a `Result`, if it's an error then let client know and return. #[macro_export] macro_rules! try_send_error { ($i:ident, $e:expr) => { @@ -46,6 +47,7 @@ macro_rules! try_send_error { }; } +/// Unwrap a `Result, E>`, log message if it's error or none #[macro_export] macro_rules! try_option_send_error { ($i:ident, $e:expr) => {