jorgecarleitao commented on a change in pull request #8842:
URL: https://github.com/apache/arrow/pull/8842#discussion_r536947859
##########
File path: rust/arrow/src/datatypes.rs
##########
@@ -219,9 +218,9 @@ pub trait ArrowPrimitiveType: 'static {
/// the corresponding Arrow data type of this primitive type.
const DATA_TYPE: DataType;
- /// Returns the bit width of this primitive type.
- fn get_bit_width() -> usize {
- size_of::<Self::Native>() * 8
+ /// Returns the byte width of this primitive type.
+ fn get_byte_width() -> usize {
+ size_of::<Self::Native>()
Review comment:
Yeah, this `* 8` and `/ 8` was always a bit funny to me, mostly because
I was not sure whether the compiler was able to realize about it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]