Skip to content

Commit

Permalink
use .write instead of .copy_to
Browse files Browse the repository at this point in the history
  • Loading branch information
kickster97 committed Sep 5, 2023
1 parent 8887e35 commit 0d2fab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/amq/protocol/table.cr
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ module AMQ
private def ensure_writeable
return if @io.@writeable.as(Bool)
writeable_io = IO::Memory.new(@io.bytesize)
@io.to_slice.copy_to(writeable_io.buffer, writeable_io.bytesize)
writeable_io.write @io.to_slice
@io = writeable_io
end

Expand Down

0 comments on commit 0d2fab6

Please sign in to comment.