diff --git a/src/lang/lang_string.ml b/src/lang/lang_string.ml index 661bedac63..beee459adf 100644 --- a/src/lang/lang_string.ml +++ b/src/lang/lang_string.ml @@ -357,7 +357,7 @@ module Version = struct let num = Re.Pcre.get_substring sub 1 in let str = try Re.Pcre.get_substring sub 2 with _ -> "" in let num = - let int_of_string s = if s = "x" then (-1) else int_of_string s in + let int_of_string s = if s = "x" then -1 else int_of_string s in String.split_on_char '.' num |> List.map int_of_string in (num, str) diff --git a/tests/core/string_test.ml b/tests/core/string_test.ml index c3e9570974..7c66caf607 100644 --- a/tests/core/string_test.ml +++ b/tests/core/string_test.ml @@ -1,4 +1,5 @@ let () = assert ("aa\\\"bb" = Lang_string.escape_utf8_string "aa\"bb") (* Bug #4287 *) -let () = ignore (Lang_string.Version.of_string "rolling-release-v2.3.x+git@2addd93da") +let () = + ignore (Lang_string.Version.of_string "rolling-release-v2.3.x+git@2addd93da")