Skip to content

Commit

Permalink
[flow] Reduce the range of min/max safe integer in fuzzy_score
Browse files Browse the repository at this point in the history
Summary:
The goal is to make autocomplete work in try-flow. This module will be pulled in to autocomplete, since it uses fuzzy score to filter and rank results.

For some reason, js_of_ocaml wants the integer to fit into 32 bits, so I reduced the range. It shouldn't really matter here, since the fuzzy score should never get that big/small.

Changelog: [internal]

Reviewed By: panagosg7

Differential Revision: D55552711

fbshipit-source-id: 93a8f6f230b38bf06446c786b8d7c0222443c620
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Apr 2, 2024
1 parent f5420c9 commit f702ab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/fuzzy_score/fuzzy_score.ml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

let max_len = 128

let min_safe_integer = -9007199254740991
let min_safe_integer = -2147483648

let max_safe_integer = 9007199254740991
let max_safe_integer = 2147483647

type arrow =
| Empty
Expand Down

0 comments on commit f702ab9

Please sign in to comment.