aztec-nr icon indicating copy to clipboard operation
aztec-nr copied to clipboard

fix: Incorrect macro usage and redundant boolean comparison

Open Anon-im opened this issue 1 year ago • 0 comments

In Rust, assert! is a macro and must be called with an exclamation mark and a condition inside the parentheses. Using assert(condition) without the exclamation mark will result in a compilation error, as assert does not exist as a function. Without fixing this, the program will not compile.

Redundant == true Check: The function valid_fn already returns a boolean value (bool). When a function already returns a boolean value (bool), an additional comparison with true or false is redundant and reduces code readability.

Anon-im avatar Dec 26 '24 11:12 Anon-im