[SR-14886] UnsafeMutableRawBufferPointer.copyBytes copies byte by byte (even when contiguous form available) #57233
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
good first issue
Good for newcomers
performance
standard library
Area: Standard library umbrella
Environment
today's
main
branch.Additional Detail from JIRA
md5: fd0f6279a58da9175d769c554d5eac61
Issue Description:
The code for
UMRBP.copyBytes
which takes aCollection
of {{UInt8}}s elements and copies them into the buffer fails to see if there's a contiguous representation available.It should just try
withContiguousStorageIfAvailable
and fall back onto byte by byte if that returnsnil
.The text was updated successfully, but these errors were encountered: