Skip to content

Commit 72854c4

Browse files
committed
fix linting, address comments
1 parent 4c29007 commit 72854c4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

arrow-ipc/src/reader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fn create_array(
8686
BinaryView | Utf8View => {
8787
let count = variadic_counts
8888
.pop_front()
89-
.expect("Incorrect variadic count!");
89+
.ok_or(ArrowError::IpcError("Incorrect variadic count!".to_owned()))?;
9090
let count = count + 2; // view and null buffer.
9191
let buffers = (0..count)
9292
.map(|_| reader.next_buffer())
@@ -359,7 +359,7 @@ impl<'a> ArrayReader<'a> {
359359
Utf8View | BinaryView => {
360360
let count = variadic_count
361361
.pop_front()
362-
.expect("Incorrect variadic count!");
362+
.ok_or(ArrowError::IpcError("Incorrect variadic count!".to_owned()))?;
363363
let count = count + 2; // view and null buffer.
364364
for _i in 0..count {
365365
self.skip_buffer()

arrow-ipc/src/writer.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,9 +1895,8 @@ mod tests {
18951895
Some(LONG_TEST_STRING.as_bytes()),
18961896
];
18971897
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)]);
19011900
let record_batch = RecordBatch::try_new(
19021901
Arc::new(schema.clone()),
19031902
vec![Arc::new(binary_array), Arc::new(utf8_array)],

0 commit comments

Comments
 (0)