alamb commented on code in PR #6479:
URL: https://github.com/apache/arrow-rs/pull/6479#discussion_r1779488790
##########
arrow-array/src/array/byte_view_array.rs:
##########
@@ -872,12 +875,9 @@ mod tests {
#[should_panic(expected = "Invalid buffer index at 0: got index 3 but only
has 1 buffers")]
fn new_with_invalid_view_data() {
let v = "large payload over 12 bytes";
- let view = ByteView {
- length: 13,
- prefix: u32::from_le_bytes(v.as_bytes()[0..4].try_into().unwrap()),
- buffer_index: 3,
- offset: 1,
- };
+ let view = ByteView::new(13, &v.as_bytes()[0..4])
Review Comment:
This is an example of the kind of improvement the new API allows (aka not
having to know to do try_into/unwrap for byte slices
--
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]