mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
First compiling version of per-block-proc refactor
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
#[macro_use]
|
||||
macro_rules! ensure {
|
||||
($condition: expr, $result: ident) => {
|
||||
macro_rules! verify {
|
||||
($condition: expr, $result: expr) => {
|
||||
if !$condition {
|
||||
return Err(Error::Invalid(Invalid::$result));
|
||||
return Err(Error::Invalid($result));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! invalid {
|
||||
($result: expr) => {
|
||||
return Err(Error::Invalid($result));
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user