Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1000: Replace runtime size check with compile time check
7a3bb7d Replace runtime size check with compile time check (Tobin C. Harding) Pull request description: Add a macro `const_assert` that uses some const declaration trickery to trigger a compile time error if a boolean expression is false. Replace runtime checks using `debug_assert_eq!` with the newly defined `const_asert!` macro. ## Note This PR is the first patch from a [recently closed PR](#953). Props to @elichai for the macro idea in the review of that PR. ACKs for top commit: Kixunil: ACK 7a3bb7d apoelstra: ACK 7a3bb7d Tree-SHA512: cfd4dcf6c66e06796cab6dc49445f0f8c5d4e686893a17735420dccedd75ad7c632d240a5ab92ee47ce459b799daeaf3fdf9c6b77c1b81b09e87197a9f86c5ba
- Loading branch information
Showing
3 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters