Skip to content

Commit

Permalink
Improve printing of several arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle authored Sep 12, 2024
1 parent 945517b commit b47a494
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/strings/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ end
function print(io::IO, xs...)
lock(io)
try
for x in xs
foreach(xs) do x
print(io, x)
end
finally
Expand Down Expand Up @@ -144,7 +144,7 @@ function print_to_string(xs...)
end
# specialized for performance reasons
s = IOBuffer(sizehint=siz)
for x in xs
foreach(xs) do x
print(s, x)
end
String(_unsafe_take!(s))
Expand All @@ -161,7 +161,7 @@ function string_with_env(env, xs...)
# specialized for performance reasons
s = IOBuffer(sizehint=siz)
env_io = IOContext(s, env)
for x in xs
foreach(xs) do x
print(env_io, x)
end
String(_unsafe_take!(s))
Expand Down

0 comments on commit b47a494

Please sign in to comment.