refactor(bytes): prepare for noUncheckedIndexedAccess (#4119)

refactor(bytes): prepare for noUncheckedIndexedAccess
This commit is contained in:
Simon Holloway 2024-01-05 21:37:29 +00:00 committed by GitHub
parent 8eb433b5d3
commit bd08c2b57d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ Deno.test("equals() handles randomized testing", () => {
const arr3 = arr1.slice(0);
// the chance of arr1 equaling arr2 is basically 0
// but introduce an inequality at the end just in case
arr2[arr2.length - 1] = arr1[arr1.length - 1] ^ 1;
arr2[arr2.length - 1] = arr1.at(-1)! ^ 1;
// arr3 is arr1 but with an inequality in the very last element
// this is to test the equality check when length isn't a multiple of 4
arr3[arr3.length - 1] ^= 1;