quantumish opened a new pull request, #10019:
URL: https://github.com/apache/arrow-rs/pull/10019

   # Which issue does this PR close?
   
   - Closes #10018.
   
   # Rationale for this change
   
   There isn't a clear way to fix the `From<Vec<_>>` implementations for 
`FixedSizeBinaryArray` that wouldn't be confusing, so making them `TryFrom` is 
a better fit since they are in genuine use across e.g. tests within the Arrow 
library as well as a terser way of calling 
`FixedSizeBinaryArray::try_from_iter` or 
`FixedSizeBinaryArray::try_from_sparse_iter`. 
   
   # What changes are included in this PR?
   
   - Converts `From<Vec<&[u8]>>`, `From<Vec<&[u8; N]>>`, and 
`From<Vec<Option<&[u8]>>>` implementations for `FixedSizeBinaryArray` to 
`TryFrom` implementations.
   - Adds a `TryFrom<Vec<Option<&[u8; N]>>>` implementation for the missing 
combination of types.
   - Updates various test cases within Arrow to use the `try_from().unwrap()` 
instead of `from()`.
   
   # Are these changes tested?
   
   This is sort of a transparent change in that only the API for expressing 
failure cases has changed rather than the actual failure cases. All existing 
tests surrounding conversion failures have been updated to check whether a 
conversion has correctly failed.
   
   # Are there any user-facing changes?
   
   Yes, this is a breaking API change since a previously (seemingly) infallible 
function is now fallible.


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