mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 11:15:38 -05:00
fix: join_array on arrays of length=1 had a bound error
This commit is contained in:
parent
c8235f463d
commit
d60bf3828b
1 changed files with 1 additions and 1 deletions
|
|
@ -285,7 +285,7 @@ let join_container_ ~iter ~map ~len cont : _ t =
|
|||
let join_array (a : _ t array) : _ array t =
|
||||
match Array.length a with
|
||||
| 0 -> return [||]
|
||||
| 1 -> map ?on:None a.(1) ~f:(fun x -> [| x |])
|
||||
| 1 -> map ?on:None a.(0) ~f:(fun x -> [| x |])
|
||||
| _ -> join_container_ ~len:Array.length ~map:Array.map ~iter:Array.iter a
|
||||
|
||||
let join_list (l : _ t list) : _ list t =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue