new macro to make error reporting a bit clearer

This commit is contained in:
shockrah 2020-09-17 19:35:22 -07:00
parent 471639a635
commit d08ae63f50
2 changed files with 7 additions and 1 deletions

View File

@ -4,7 +4,12 @@ use async_trait::async_trait;
use crate::Response; use crate::Response;
use crate::UBigInt; use crate::UBigInt;
pub const NO_CONN_MSG: &'static str = "No connection could be established"; #[macro_export]
macro_rules! no_conn {
($spec:literal) => {
format!("No connection could be established: {}", $spec)
}
}
/* /*
* NOTE: pay attention to work on async in traits for rust * NOTE: pay attention to work on async in traits for rust

View File

@ -1,6 +1,7 @@
mod member; mod member;
mod common; mod common;
mod invites; mod invites;
mod channels;
use std::vec::Vec; use std::vec::Vec;