Protocol Buffers codec for hand-written schemas
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

sort: trim unused helpers across encoding libs

Expose only what's actually called. kinded' / or_kind were added
speculatively across libraries that don't use them; revert.

- toml, xml, csv: keep to_string, pp, kinded (kinded has callers —
csv 3, toml 2, xml 1). Drop kinded' and or_kind.
- cbor, protobuf: keep to_string, pp only. Drop kinded, kinded',
or_kind (no callers).
- json keeps the full API — 38 callers including kinded' (16) and
or_kind (11).

-13
-3
lib/sort.ml
··· 40 40 | Message -> "message" 41 41 42 42 let pp ppf s = Fmt.string ppf (to_string s) 43 - let or_kind ~kind s = if kind <> "" then kind else to_string s 44 - let kinded' ~kind:k s = if k = "" then s else k ^ " " ^ s 45 - let kinded ~kind s = kinded' ~kind (to_string s)
-10
lib/sort.mli
··· 34 34 35 35 val pp : Format.formatter -> t -> unit 36 36 (** [pp] formats sorts. *) 37 - 38 - val or_kind : kind:string -> t -> string 39 - (** [or_kind ~kind s] is [kind] when non-empty, otherwise {!to_string} [s]. *) 40 - 41 - val kinded' : kind:string -> string -> string 42 - (** [kinded' ~kind s] is [s] when [kind] is empty, [kind] followed by a space 43 - and [s] otherwise. *) 44 - 45 - val kinded : kind:string -> t -> string 46 - (** [kinded ~kind sort] is {!kinded'} applied to {!to_string} [sort]. *)