Skip to content

Commit

Permalink
Merge pull request #31 from zkemail/audit/optimization-opportunities
Browse files Browse the repository at this point in the history
veredise audit fix: Apply optimization suggestion to find_zeroes
  • Loading branch information
jp4g authored Jan 13, 2025
2 parents 465b6dc + 32e7fb3 commit f66b3da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/remove_soft_line_breaks.nr
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn find_zeroes<let N: u32>(encoded: [u8; N]) -> [bool; N] {
let mut should_zero: [bool; N] = [false; N];
should_zero[0] = is_break[0];
should_zero[1] = is_break[1] + is_break[0];
should_zero[N - 1] = is_break[N - 2] + is_break[N - 3];
should_zero[N - 1] = is_break[N - 3];
for i in 2..N - 1 {
should_zero[i] = is_break[i] + is_break[i - 1] + is_break[i - 2];
}
Expand Down

0 comments on commit f66b3da

Please sign in to comment.