New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ByteString.toArrayUnsafe method for zero copy transformation of bytestrings #30262
ByteString.toArrayUnsafe method for zero copy transformation of bytestrings #30262
Conversation
Test FAILed. |
Test PASSed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Test PASSed. |
* only read the bytes and never mutate then. For all other intents and purposes, please use the usual | ||
* toArray method - which provide the immutability guarantees by copying the backing array. | ||
*/ | ||
def toArrayUnsafe(): Array[Byte] = toArray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No optimized implementation for scala3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is same as for 2.12 and 2.13, the optimizations are in the overrides
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is same as for 2.12 and 2.13, the optimizations are in the overrides
Refs #30257