upstream: https://github.com/mirage/ocaml-mbr
0
fork

Configure Feed

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

wal, block, sse, zephyr: remove [mutable] from never-reassigned fields

Warning 69 (unused-field, mutable-never-assigned). Four independent
record fields were flagged as mutable but the code only mutates their
referents in place, never rebinds the record slot itself:

- ocaml-wal/lib/wal.ml: [t.file] (the Eio file resource; methods call
Eio.File.pwrite_all etc., the slot is set once at open time).
- ocaml-block/lib/block.ml: [Memory.state.data] (the backing bytes,
written via Bytes.blit_string; [Bytes.t] is already mutable).
- ocaml-sse/lib/sse.ml: [Parser.t.data_buf] (a Buffer.t, written via
Buffer.add_*; the slot never changes).
- ocaml-zephyr/lib/zephyr.ml: drop [mode : Read | Write] entirely —
set at open-time, read nowhere. The open_read / open_write
constructors already distinguish the two call shapes, so mode
tracking was redundant.

+9 -1
+3
dune
··· 1 + (env 2 + (dev 3 + (flags :standard %{dune-warnings})))
+6 -1
lib/mbr.mli
··· 72 72 val codec : t Wire.Codec.t 73 73 (** Wire codec for a 16-byte MBR partition entry. *) 74 74 75 - (** Wire struct definition for a partition entry. *) 75 + val sizeof : int 76 + (** [sizeof] is the on-disk size of a partition entry in bytes (16). *) 77 + 78 + val struct_ : Wire.Everparse.struct_ 79 + (** Wire struct definition for a partition entry, for EverParse 3d 80 + code generation. *) 76 81 end 77 82 78 83 type t = private {