Skip to content

Commit e6667dc

Browse files
Don't check for length
This was necessary for the indexing operation but Astring can take care of it itself.
1 parent 542e69d commit e6667dc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/block.ml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,7 @@ let guess_ocaml_kind contents =
217217

218218
let ends_by_semi_semi c =
219219
match List.rev c with
220-
| h :: _ ->
221-
let len = String.length h in
222-
len > 2 && Astring.String.is_suffix ~affix:";;" h
220+
| h :: _ -> Astring.String.is_suffix ~affix:";;" h
223221
| _ -> false
224222

225223
let pp_line_directive ppf (file, line) = Fmt.pf ppf "#%d %S" line file

0 commit comments

Comments
 (0)