Skip to content

Commit 9ab7b9f

Browse files
committed
Delay pair destructuring to reduce code size
1 parent 2d1820f commit 9ab7b9f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/picos/picos.ocaml5.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,9 @@ module Computation = struct
404404
if try_attach t trigger then begin
405405
match Trigger.await trigger with
406406
| None -> begin match op with Ignore -> () | Peek -> peek_exn t end
407-
| Some (exn, bt) ->
407+
| Some exn_bt ->
408408
unsafe_unsuspend t Backoff.default |> ignore;
409-
Printexc.raise_with_backtrace exn bt
409+
Printexc.raise_with_backtrace (fst exn_bt) (snd exn_bt)
410410
end
411411
else begin
412412
match op with Ignore -> () | Peek -> peek_exn t
@@ -657,9 +657,9 @@ module Fiber = struct
657657
if Computation.try_attach sleep trigger then
658658
match Trigger.await trigger with
659659
| None -> ()
660-
| Some (exn, bt) ->
660+
| Some exn_bt ->
661661
Computation.finish sleep;
662-
Printexc.raise_with_backtrace exn bt
662+
Printexc.raise_with_backtrace (fst exn_bt) (snd exn_bt)
663663

664664
(* END FIBER COMMON *)
665665
end

0 commit comments

Comments
 (0)