Skip to content

Commit 9f03a43

Browse files
committed
use list concat instead of nested List.exists
1 parent 70bc9d6 commit 9f03a43

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/request_handler.ml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ let log = Log.from "request_handler"
66
let update_config (ctx : Lib.Context.t) = function
77
| Lib.Github.Push n ->
88
let is_config_file f = String.equal f ctx.data.cfg_filename in
9-
let commit_contains_config_file (c : Lib.Github_t.commit) =
10-
List.exists (List.exists is_config_file) [ c.added; c.modified ]
11-
in
9+
let commit_contains_config_file (c : Lib.Github_t.commit) = List.exists is_config_file (c.added @ c.modified) in
1210
( match List.exists commit_contains_config_file n.commits with
1311
| true -> Lib.Context.refresh_config ctx
1412
| false -> Lwt.return_unit

0 commit comments

Comments
 (0)