Skip to content

Commit

Permalink
[fleche] Nit: replace unneeded Option.bind by Option.map
Browse files Browse the repository at this point in the history
  • Loading branch information
ejgallego committed Oct 5, 2024
1 parent 42de4fb commit f98b653
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fleche/doc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,11 @@ end = struct
if !Config.v.send_diags_extra_data then
extra_diagnostics_of_ast qf stm_range ast
else
Option.bind qf (fun qf ->
Option.map
(fun qf ->
let sentenceRange, failedRequire, quickFix = (None, None, Some qf) in
Some { Lang.Diagnostic.Data.sentenceRange; failedRequire; quickFix })
{ Lang.Diagnostic.Data.sentenceRange; failedRequire; quickFix })
qf

let error ~err_range ~quickFix ~msg ~stm_range ?ast () =
let data = extra_diagnostics_of_ast quickFix stm_range ast in
Expand Down

0 comments on commit f98b653

Please sign in to comment.