Adds assert_error macro

This commit is contained in:
Age 2018-09-19 14:00:35 +10:00
parent b8ca18f87b
commit 815180d88c
No known key found for this signature in database
GPG Key ID: 05EED64B79E06A93
3 changed files with 16 additions and 1 deletions

View File

@ -6,11 +6,12 @@ extern crate clap;
extern crate network_libp2p;
extern crate futures;
#[macro_use]
pub mod utils;
pub mod db;
pub mod client;
pub mod state;
pub mod sync;
pub mod utils;
pub mod config;
use std::path::PathBuf;

View File

@ -0,0 +1,10 @@
#[macro_export]
macro_rules! assert_error {
($exp: expr, $err: expr) => {
if ( !$exp ) {
return Err($err);
}
}
}

View File

@ -3,8 +3,12 @@ extern crate blake2;
extern crate crypto_mac;
extern crate boolean_bitfield;
#[macro_use]
pub mod macros;
pub mod types;
pub mod bls;
pub mod test_helpers;
pub mod logging;
pub mod errors;