Skip to content

Commit

Permalink
Add if_ethbloom conditional macro (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
vorot93 committed Sep 30, 2022
1 parent 6aa58bf commit baebea7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ethereum-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,19 @@ pub type Address = H160;
pub type Secret = H256;
pub type Public = H512;
pub type Signature = H520;

/// Conditional compilation depending on whether ethereum-types is built with ethbloom support.
#[cfg(feature = "ethbloom")]
#[macro_export]
macro_rules! if_ethbloom {
($($tt:tt)*) => {
$($tt)*
};
}

#[cfg(not(feature = "ethbloom"))]
#[macro_export]
#[doc(hidden)]
macro_rules! if_ethbloom {
($($tt:tt)*) => {};
}

0 comments on commit baebea7

Please sign in to comment.