alamb commented on code in PR #9712:
URL: https://github.com/apache/arrow-rs/pull/9712#discussion_r3082359882


##########
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:
   what is the clippy lint that is triggered?
   
   To be honest I found this formulation harder to read than the previous one



-- 
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]

Reply via email to