Skip to content

Commit

Permalink
added BoundedOutputStream - v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausC committed Jan 29, 2020
1 parent 999f731 commit c9a703c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BoundedStreams"
uuid = "819c7365-da23-433e-86d1-f9a07e67aad6"
authors = ["Klaus Crusius <[email protected]>"]
version = "0.1.0"
version = "0.2.0"

[compat]
julia = "1.3"
Expand Down
4 changes: 2 additions & 2 deletions src/BoundedStreams.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct BoundedInputStream{T} <: BoundedStream{T}
close::Int
function BoundedInputStream(io::T, nb::Integer;
offset::Integer=0, close::Integer=nb) where T

isreadable(io) || throw(ArgumentError("source stream is not readable"))
new{T}(io, initposition!(io, offset), nb, close)
end
Expand Down Expand Up @@ -57,7 +57,7 @@ struct BoundedOutputStream{T} <: BoundedStream{T}
close::Int
function BoundedOutputStream(io::T, nb::Integer;
offset::Integer=0, close::Integer=nb) where T

iswritable(io) || throw(ArgumentError("source stream is not writable"))
new{T}(io, initposition!(io, offset), nb, close)
end
Expand Down

0 comments on commit c9a703c

Please sign in to comment.