AdamGS commented on code in PR #9712:
URL: https://github.com/apache/arrow-rs/pull/9712#discussion_r3085827178
##########
arrow-array/src/array/fixed_size_binary_array.rs:
##########
@@ -94,27 +94,31 @@ impl FixedSizeBinaryArray {
ArrowError::InvalidArgumentError(format!("Size cannot be negative,
got {size}"))
})?;
- let len = if s == 0 {
- if !values.is_empty() {
- return Err(ArrowError::InvalidArgumentError(
- "Buffer cannot have non-zero length if the item size is
zero".to_owned(),
- ));
+ let len = match values.len().checked_div(s) {
Review Comment:
its going to be `clippy::manual_checked_ops` which I think will be part of
1.95, I just ran into it because I was building with nightly.
--
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]