You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's pretty much agreed that the truncating behaviour of String(::Vector{UInt8}) was a design mistake: #32528. It'd be unfortunate to repeat this with Memory, given that there is still time before 1.11 is released.
A more targeted fix of #54369 than #54372
Preserves the performance improvements added in #53962 by creating a new
internal `_unsafe_takestring!(v::Memory{UInt8})` function that does what
`String(::Memory{UInt8})` used to do.
The docstring of
String
says:Since
Memory
is anAbstractVector
,String
should make a copy. However, it doesn't look like this is happening in:julia/base/strings/string.jl
Lines 67 to 71 in 9d8e0e7
Maybe the current
String(v::Memory{UInt8})
method could be renamed to something liketake_string!
to make it clear that it can mutatev
.The text was updated successfully, but these errors were encountered: