Skip to content

Commit d7cdd67

Browse files
committed
Fixup
1 parent c62ca95 commit d7cdd67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

base/iobuffer.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ mutable struct GenericIOBuffer{T<:AbstractVector{UInt8}} <: IO
9393
maxsize::Int,
9494
) where T<:AbstractVector{UInt8}
9595
len = Int(length(data))::Int
96-
return new(data, false, readable, writable, seekable, append, len, maxsize, 1, 0, -1)
96+
return new{T}(data, false, readable, writable, seekable, append, len, maxsize, 1, 0, -1)
9797
end
9898
end
9999

@@ -297,8 +297,8 @@ function copy(b::GenericIOBuffer{T}) where T
297297
else
298298
# When the buffer is just readable, they can share the same data, so we just make
299299
# a shallow copy of the IOBuffer struct.
300-
# Use unsafe method because we want to allow b.maxsize to be larger than data, in case that
301-
# is the case for `b`.
300+
# Use internal constructor because we want to allow b.maxsize to be larger than data,
301+
# in case that is the case for `b`.
302302
ret = _new_generic_iobuffer(T, b.data, b.readable, b.writable, b.seekable, b.append, b.maxsize)
303303
ret.offset = b.offset
304304
ret.ptr = b.ptr

0 commit comments

Comments
 (0)