Jefffrey commented on issue #10252: URL: https://github.com/apache/arrow-rs/issues/10252#issuecomment-5085914318
> I wonder why this code even uses `size_of`, it could just use the length of the slice instead. perhaps using `size_of()` is a minor optimization to get the size at compile time instead of runtime check each time 🤔 > Is there a PR to fix this? it seems the fix would be to make the function `unafe`? another option is to seal `ToByteSlice`, since the docstring already states its meant for arrow supported types https://github.com/apache/arrow-rs/blob/8e7043bf937b60e3be8586ceb3cd00349b989e1e/arrow-buffer/src/native.rs#L267-L271 `ArrowNativeType` is already likewise sealed to prevent misuse 🤔 -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
