def pr.close

bend-kit-tar@0.3.0.0 · tar.bend:251

import bend-kit-tar@0.3.0.0/tar.bend as Tar
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

251def pr.close(limit: Bytes.CursorLimit, r: Bytes.Cursor & Pst) -> Bytes.Cursor & Pst:
252  (c, st) = r
253  match st:
254    case PGo{pax}:
255      pr.nl(pax, Bytes.Cursor.u8(Bytes.Cursor.leave(c, limit)))
256    case PEnd{pax}:
257      (Bytes.Cursor.leave(c, limit), PBad{})
258    case PBad{}:
259      (Bytes.Cursor.leave(c, limit), PBad{})

Uses (8)

Used by (1)