[minor] Remove unnecessary exists check over singleton list

Reviewed By: jvillard

Differential Revision: D25305166

fbshipit-source-id: 1bfebf752
master
Ezgi Çiçek 4 years ago committed by Facebook GitHub Bot
parent 3ceac69079
commit 7de9c49a6d

@ -202,7 +202,7 @@ let patterns_of_json_with_key (json_key, json) =
match detect_language assoc with match detect_language assoc with
| Ok language -> | Ok language ->
let is_method_pattern key = List.exists ~f:(String.equal key) ["class"; "method"] let is_method_pattern key = List.exists ~f:(String.equal key) ["class"; "method"]
and is_source_contains key = List.exists ~f:(String.equal key) ["source_contains"] in and is_source_contains key = String.equal "source_contains" key in
let rec loop = function let rec loop = function
| [] -> | [] ->
Error ("Unknown pattern for " ^ json_key) Error ("Unknown pattern for " ^ json_key)

Loading…
Cancel
Save