Skip to content

Commit

Permalink
Add MERITRANK_NO_ASSERT compile time option
Browse files Browse the repository at this point in the history
  • Loading branch information
automainint committed Jul 7, 2024
1 parent 60e57f3 commit b1261ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ MeritRank is a Rust library for computing merit scores and rankings in a directe

Original `meritrank` is maintained by [Vladimir Radkevich](https://github.com/vsradkevich).

## Compilation options
- `MERITRANK_NO_ASSERT=1` - disable runtime asserts for better performance.
2 changes: 1 addition & 1 deletion src/constants.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub const ASSERT : bool = true;
pub const ASSERT : bool = std::option_env!("MERITRANK_NO_ASSERT").is_none();
pub const VERBOSE : bool = true;
pub const OPTIMIZE_INVALIDATION : bool = true;
pub const EPSILON : f64 = 1e-6;

0 comments on commit b1261ec

Please sign in to comment.