File tree 2 files changed +4
-5
lines changed 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ fn create_array(
86
86
BinaryView | Utf8View => {
87
87
let count = variadic_counts
88
88
. pop_front ( )
89
- . expect ( "Incorrect variadic count!" ) ;
89
+ . ok_or ( ArrowError :: IpcError ( "Incorrect variadic count!" . to_owned ( ) ) ) ? ;
90
90
let count = count + 2 ; // view and null buffer.
91
91
let buffers = ( 0 ..count)
92
92
. map ( |_| reader. next_buffer ( ) )
@@ -359,7 +359,7 @@ impl<'a> ArrayReader<'a> {
359
359
Utf8View | BinaryView => {
360
360
let count = variadic_count
361
361
. pop_front ( )
362
- . expect ( "Incorrect variadic count!" ) ;
362
+ . ok_or ( ArrowError :: IpcError ( "Incorrect variadic count!" . to_owned ( ) ) ) ? ;
363
363
let count = count + 2 ; // view and null buffer.
364
364
for _i in 0 ..count {
365
365
self . skip_buffer ( )
Original file line number Diff line number Diff line change @@ -1895,9 +1895,8 @@ mod tests {
1895
1895
Some ( LONG_TEST_STRING . as_bytes( ) ) ,
1896
1896
] ;
1897
1897
let binary_array = BinaryViewArray :: from_iter ( values) ;
1898
- let utf8_array = StringViewArray :: from_iter (
1899
- vec ! [ Some ( "foo" ) , Some ( "bar" ) , Some ( LONG_TEST_STRING ) ] . into_iter ( ) ,
1900
- ) ;
1898
+ let utf8_array =
1899
+ StringViewArray :: from_iter ( vec ! [ Some ( "foo" ) , Some ( "bar" ) , Some ( LONG_TEST_STRING ) ] ) ;
1901
1900
let record_batch = RecordBatch :: try_new (
1902
1901
Arc :: new ( schema. clone ( ) ) ,
1903
1902
vec ! [ Arc :: new( binary_array) , Arc :: new( utf8_array) ] ,
You can’t perform that action at this time.
0 commit comments