Skip to content

Commit

Permalink
internals: Remove double parenthesis in const_assert
Browse files Browse the repository at this point in the history
The current `const_assert` macro is unused in the code base. We would
like to use it differently to how it was initially designed, remove the
parenthesis so it can be called directly in a module.
  • Loading branch information
tcharding committed Aug 4, 2024
1 parent 2300b28 commit 49a6acc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internals/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ macro_rules! debug_from_display {
/// Asserts a boolean expression at compile time.
#[macro_export]
macro_rules! const_assert {
($x:expr) => {{
($x:expr) => {
const _: [(); 0 - !$x as usize] = [];
}};
};
}

/// Derives `From<core::convert::Infallible>` for the given type.
Expand Down

0 comments on commit 49a6acc

Please sign in to comment.