Skip to content

Commit acbb4a3

Browse files
committed
fix: parse snapshot list
Signed-off-by: Ion Koutsouris <[email protected]>
1 parent 8e77030 commit acbb4a3

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

crates/core/src/kernel/snapshot/parse.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,10 @@ fn collect_string_list(arr: &Option<&ListArray>, idx: usize) -> Option<Vec<Strin
317317
arr.and_then(|val| {
318318
let values = val.value(idx);
319319
let values = values.as_ref().as_any().downcast_ref::<StringArray>()?;
320-
Some(
321-
values
322-
.iter()
323-
.filter_map(|v| v.map(|vv| vv.to_string()))
324-
.collect(),
325-
)
320+
let string_vec: Vec<String> = values
321+
.iter()
322+
.filter_map(|v| v.map(|vv| vv.to_string()))
323+
.collect();
324+
(!string_vec.is_empty()).then_some(string_vec)
326325
})
327326
}

0 commit comments

Comments
 (0)