Skip to content

Commit

Permalink
replace bad resize! with take!
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Feb 16, 2022
1 parent e311a2a commit 3100b31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/Profile/src/Profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function _peek_report()
iob = IOBuffer()
ioc = IOContext(IOContext(iob, stdout), :displaysize=>displaysize(stdout))
print(ioc, groupby = [:thread, :task])
Base.print(stdout, String(resize!(iob.data, iob.size)))
Base.print(stdout, String(take!(iob)))
end
# This is a ref so that it can be overridden by other profile info consumers.
const peek_report = Ref{Function}(_peek_report)
Expand Down

0 comments on commit 3100b31

Please sign in to comment.