Skip to content

Commit b9fd30b

Browse files
committed
Adding in TODO note
1 parent 92a464d commit b9fd30b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/js-sys/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4596,6 +4596,8 @@ macro_rules! arrays {
45964596
// TODO if this was written in JS it could avoid passing the `view` TypedArray to Rust,
45974597
// which would be more efficient
45984598

4599+
// TODO measure if it's faster to use `slice` instead of `new`
4600+
45994601
// This is safe because the `new` function makes a copy if its argument is a TypedArray
46004602
unsafe { $name::new(&$name::view(slice)) }
46014603
}

0 commit comments

Comments
 (0)