Skip to content

Commit 8084010

Browse files
neilconwaymartin-g
andauthored
Apply suggestion from @martin-g
Co-authored-by: Martin Grigorov <martin-g@users.noreply.github.com>
1 parent e52f506 commit 8084010

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • datafusion/expr/src/type_coercion

datafusion/expr/src/type_coercion/other.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub fn get_coerce_type_for_case_expression(
6767
else_type: Option<&DataType>,
6868
) -> Option<DataType> {
6969
let (initial_type, remaining) = match else_type {
70-
None => (&then_types[0], &then_types[1..]),
70+
None => then_types.split_first()?,
7171
Some(data_type) => (data_type, then_types),
7272
};
7373
fold_coerce(initial_type, remaining, type_union_coercion)

0 commit comments

Comments
 (0)