Functions that are wrappers around assert statements are likely to be marked by necessist, but are always false positives. For example, in rust:
#[test]
fn test_something() {
assert_normalizes("abcd", "def1");
}
fn assert_normalizes(sig_hex: String, expected_hex: String) {
let sig = decode(&sig_hex).unwrap();
let normalized_sig = normalize_ecdsa(sig).unwrap();
assert_eq!(encode(&normalized_sig), expected_hex);
}
Removal of assert_normalizes should not be important. Heuristic for the improvement would be to not mark functions that have standard assert statements and do not modify global values.
Functions that are wrappers around
assertstatements are likely to be marked by necessist, but are always false positives. For example, in rust:Removal of
assert_normalizesshould not be important. Heuristic for the improvement would be to not mark functions that have standard assert statements and do not modify global values.