Skip to content

Commit a71d2b8

Browse files
dombongrr0gi
andauthored
github: minor use match...exception rather than try
Co-authored-by: rr0gi <[email protected]>
1 parent 456da67 commit a71d2b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/github.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ let gh_link_of_string url_str =
144144
with _ -> None
145145
in
146146
let verify_compare_basehead repo basehead =
147-
try
147+
148148
match Re2.find_submatches_exn compare_basehead_re basehead with
149149
| [| _; Some base; _; Some merge |] -> Some (Compare (repo, (base, merge)))
150-
| _ -> None
151-
with Re2.Exceptions.Regex_match_failed _ -> None
150+
| _
151+
| exception Re2.Exceptions.Regex_match_failed _ -> None
152152
in
153153
begin
154154
try

0 commit comments

Comments
 (0)