-
Notifications
You must be signed in to change notification settings - Fork 80
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
refactor buffer to use FixedArray[Byte]
instead of Bytes
#1231
Conversation
From the provided
These observations focus on potential issues that could impact the functionality and maintainability of the code, especially concerning deprecated functions, logical correctness, and consistent naming conventions. |
Pull Request Test Coverage Report for Build 3902Details
💛 - Coveralls |
629c206
to
aaa2be2
Compare
bytes/bytes.mbt
Outdated
/// Makes a new Bytes from a fixedarray. | ||
pub fn Bytes::from_fixedarray( | ||
arr : FixedArray[Byte], | ||
len~ : Int = arr.length() |
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.
let's not use this feature, we may remove the labelled dependency to keep the language simple
This refactor is a preparation for making
Bytes
immutable. It basically changes the use ofBytes
in the typeBuffer
toFixedArray[Byte]
, and addedBytes::cast_from_fixedarray
andcast_to_fixedarray
to convert betweenBytes
andFixedArray[Byte]
. Currently, these casts need to allocate, and we plan to implement these casts as primitives in the compiler to avoid the allocation eventually.