Skip to content

Commit

Permalink
refactor: remove Modules.is_empty (#6564)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Nov 24, 2022
1 parent cb874a2 commit 7d9b541
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/dune_rules/modules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ module Wrapped = struct
; wrapped : Mode.t
}

let empty t = Module_name.Map.is_empty t.modules

let encode
{ modules; wrapped_compat; alias_module; main_module_name; wrapped } =
let open Dune_lang.Encoder in
Expand Down Expand Up @@ -774,11 +772,6 @@ let relocate_alias_module t ~src_dir =
| Wrapped t -> Wrapped (Wrapped.relocate_alias_module t ~src_dir)
| s -> s

let is_empty = function
| Stdlib _ | Impl _ | Singleton _ -> false
| Unwrapped w -> Module_name.Map.is_empty w
| Wrapped w -> Wrapped.empty w

let as_singleton = function
| Singleton m -> Some m
| _ -> None
Expand Down
2 changes: 0 additions & 2 deletions src/dune_rules/modules.mli
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ val exit_module : t -> Module.t option
module to [src_dir]. Only works if [t] is wrapped. *)
val relocate_alias_module : t -> src_dir:Path.t -> t

val is_empty : t -> bool

val as_singleton : t -> Module.t option

val source_dirs : t -> Path.Set.t
Expand Down

0 comments on commit 7d9b541

Please sign in to comment.