def finish
import bend-kit-multipart@0.3.0.0/multipart.bend as Multipartimport Base
617# Done once the close delimiter has been read; the epilogue is ignored.
618def finish(d: Dec) -> Result<&1, &1, String, Unit>:
619 Dec{delim, dlen, st, buf} = d
620 match st:
621 case End{}:
622 Done{Unit{}}
623 case _:
624 Fail{"multipart: body ends before the close delimiter"}