Skip to content

Commit

Permalink
chore: fix clippy warnings on const arrays
Browse files Browse the repository at this point in the history
There is nothing wrong here in the codegen, but align with what clippy
wants to remove the warning.
  • Loading branch information
vthib committed Jan 17, 2025
1 parent 786fd51 commit 14b7d2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const TOPVAL: [u32; 170] = [
static TOPVAL: [u32; 170] = [
1, 2, 3, 5, 7, 11, 17, 25, 38, 57, 86, 129, 194, 291, 437, 656, 854, 1110, 1443, 1876, 2439,
3171, 3475, 3823, 4205, 4626, 5088, 5597, 6157, 6772, 7450, 8195, 9014, 9916, 10907, 11998,
13198, 14518, 15970, 17567, 19323, 21256, 23382, 25720, 28292, 31121, 34233, 37656, 41422,
Expand Down Expand Up @@ -70,7 +70,7 @@ pub fn h_distance(x: &[u8], y: &[u8]) -> i32 {
}

#[cfg(feature = "diff")]
const BIT_PAIRS_DIFF_TABLE: [[u8; 256]; 256] = {
static BIT_PAIRS_DIFF_TABLE: [[u8; 256]; 256] = {
let diff_table: [[u8; 4]; 4] = [[0, 1, 2, 6], [1, 0, 1, 2], [2, 1, 0, 1], [6, 2, 1, 0]];
let mut table = [[0; 256]; 256];
let mut i = 0;
Expand Down

0 comments on commit 14b7d2e

Please sign in to comment.