mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
refactor(bytes): prepare for noUncheckedIndexedAccess
(#4119)
refactor(bytes): prepare for noUncheckedIndexedAccess
This commit is contained in:
parent
8eb433b5d3
commit
bd08c2b57d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user