Skip to content

Commit

Permalink
remove unused End_of_stream exception
Browse files Browse the repository at this point in the history
  • Loading branch information
robur-team committed Jan 3, 2024
1 parent 54e526a commit a557ef2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
3 changes: 0 additions & 3 deletions lib/tar.ml
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,6 @@ module Header = struct
let chksum = checksum c in
set_hdr_chksum c chksum

(** Thrown if we detect the end of the tar (at least two zero blocks in sequence) *)
exception End_of_stream

(** Compute the amount of zero-padding required to round up the file size
to a whole number of blocks *)
let compute_zero_padding_length (x: t) : int =
Expand Down
10 changes: 3 additions & 7 deletions lib/tar.mli
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ module Header : sig
(** Thrown when unmarshalling a header if the checksums don't match. *)
exception Checksum_mismatch

(** Thrown if we detect the end of the tar (at least two zero blocks in sequence). *)
exception End_of_stream

(** Unmarshal a header block, returning [None] if it's all zeroes.
This header block may be preceded by an [?extended] block which
will override some fields. *)
Expand Down Expand Up @@ -162,14 +159,13 @@ module type HEADERREADER = sig
type in_channel
type 'a io

(** Returns the next header block or throws {!Header.End_of_stream} if two consecutive
(** Returns the next header block or error [`Eof] if two consecutive
zero-filled blocks are discovered. Assumes stream is positioned at the
possible start of a header block.
@param global Holds the current global pax extended header, if
any. Needs to be given to the next call to [read].
@raise Header.End_of_stream if the stream unexpectedly fails. *)
any. Needs to be given to the next call to [read]. *)
val read : global:Header.Extended.t option -> in_channel ->
(Header.t * Header.Extended.t option, [` Eof ]) result io
(Header.t * Header.Extended.t option, [ `Eof ]) result io
end

module type HEADERWRITER = sig
Expand Down

0 comments on commit a557ef2

Please sign in to comment.