Skip to content

Commit 35edb68

Browse files
committed
Fixup: Switch to ErrorException
1 parent 0cf79a4 commit 35edb68

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/transcode.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ function transcode!(
122122
codec::Codec,
123123
input::Buffer,
124124
)
125-
@assert !Base.mightalias(input.data, output.data) "input and outbut buffers must be independent"
125+
Base.mightalias(input.data, output.data) && error(
126+
"input and outbut buffers must be independent"
127+
)
126128
unsafe_transcode!(output, codec, input)
127129
end
128130

test/codecnoop.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
data = UInt8[]
193193
@test TranscodingStreams.unsafe_transcode!(Noop(), data, data) == data
194194
data = [0x01, 0x02]
195-
@test_throws AssertionError transcode(Noop(), data, data)
195+
@test_throws ErrorException transcode(Noop(), data, data)
196196
data = b""
197197
@test transcode(Noop(), data) == data
198198
@test transcode(Noop(), data) !== data

0 commit comments

Comments
 (0)