Skip to content

Commit 59b7763

Browse files
committed
fix: remove unused code
ps-id: 1BCE56E0-0364-4F2A-98A7-E8CBBD3011B7
1 parent 324b972 commit 59b7763

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

ocaml-lsp-server/src/document_store.ml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,6 @@ let remove_document store uri =
2727
let+ () = Document.close doc in
2828
Table.remove store uri)
2929

30-
let unregister_promotions t uris =
31-
let* () = Fiber.return () in
32-
List.filter uris ~f:(fun uri ->
33-
match Table.find t.db uri with
34-
| None -> false
35-
| Some doc ->
36-
let doc = { doc with promotions = doc.promotions - 1 } in
37-
let unsubscribe = doc.promotions = 0 in
38-
if unsubscribe && doc.document = None then
39-
Table.remove t.db uri
40-
else
41-
Table.set t.db uri doc;
42-
unsubscribe)
43-
|> unregister_request t
44-
45-
let register_promotions t uris =
46-
let* () = Fiber.return () in
47-
List.filter uris ~f:(fun uri ->
48-
let doc, subscribe =
49-
match Table.find t.db uri with
50-
| None -> ({ document = None; promotions = 0 }, true)
51-
| Some doc -> ({ doc with promotions = doc.promotions + 1 }, false)
52-
in
53-
Table.set t.db uri doc;
54-
subscribe)
55-
|> register_request t
56-
5730
let close t =
5831
Fiber.of_thunk (fun () ->
5932
let docs = Table.fold t ~init:[] ~f:(fun doc acc -> doc :: acc) in

ocaml-lsp-server/src/document_store.mli

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,4 @@ val get_opt : t -> Uri.t -> Document.t option
1212

1313
val remove_document : t -> Uri.t -> unit Fiber.t
1414

15-
val unregister_promotions : t -> Uri.t list -> unit Fiber.t
16-
17-
val register_promotions : t -> Uri.t list -> unit Fiber.t
18-
1915
val close : t -> unit Fiber.t

0 commit comments

Comments
 (0)