Adds assert_error macro
This commit is contained in:
parent
b8ca18f87b
commit
815180d88c
@ -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;
|
||||
|
10
lighthouse/utils/macros.rs
Normal file
10
lighthouse/utils/macros.rs
Normal file
@ -0,0 +1,10 @@
|
||||
#[macro_export]
|
||||
macro_rules! assert_error {
|
||||
($exp: expr, $err: expr) => {
|
||||
if ( !$exp ) {
|
||||
return Err($err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user