restructure and document list_users

This commit is contained in:
2021-08-12 15:48:02 +02:00
parent aeac704e89
commit bfa0bcd0bb
3 changed files with 140 additions and 115 deletions
+25
View File
@@ -1,3 +1,28 @@
pub mod home;
pub mod list_links;
pub mod list_users;
/// Unwrap a result and return it's content, or return from the function with another expression.
#[macro_export]
macro_rules! unwrap_or_return {
( $e:expr, $result:expr) => {
match $e {
Ok(x) => x,
Err(_) => return $result,
}
};
}
/// Unwrap a result and return it's content, or return from the function with another expression.
#[macro_export]
macro_rules! unwrap_or_send {
( $e:expr, $result:expr, $orders:expr) => {
match $e {
Some(x) => x,
None => {
$orders.send_msg($result);
return;},
}
};
}