Select the types of activity you want to include in your feed.
tm: rename find_clcw to extract_clcw to drop find_ prefix
The find_ prefix was redundant. We can't use bare 'clcw' because Tm.clcw is the CLCW constructor, so 'extract_clcw' makes the intent (decode the CLCW out of the frame's OCF) explicit.
···167167 match Tm.decode ~frame_len:(String.length encoded) encoded with
168168 | Error e -> fail (Fmt.str "decode: %a" Tm.pp_error e)
169169 | Ok decoded -> (
170170- match Tm.find_clcw decoded with
170170+ match Tm.extract_clcw decoded with
171171 | None -> fail "no CLCW in decoded frame"
172172 | Some (Error e) -> fail (Fmt.str "CLCW: %a" Clcw.pp_error e)
173173 | Some (Ok clcw') ->
+1-1
lib/tm.ml
···529529let decode_clcw word = Clcw.decode word
530530let encode_clcw clcw = Clcw.encode clcw
531531532532-let find_clcw frame =
532532+let extract_clcw frame =
533533 match frame.ocf with None -> None | Some word -> Some (Clcw.decode word)
534534535535(* Constructors *)
+2-2
lib/tm.mli
···176176val encode_clcw : Clcw.t -> int
177177(** [encode_clcw clcw] encodes a CLCW to a 32-bit word. *)
178178179179-val find_clcw : t -> (Clcw.t, Clcw.error) result option
180180-(** [find_clcw frame] extracts and decodes the CLCW from the frame's OCF if
179179+val extract_clcw : t -> (Clcw.t, Clcw.error) result option
180180+(** [extract_clcw frame] extracts and decodes the CLCW from the frame's OCF if
181181 present. Returns [None] if no OCF. *)
182182183183(** {1 Constructors} *)