diff --git a/datafusion/core/src/physical_plan/file_format/delimited_stream.rs b/datafusion/core/src/physical_plan/file_format/delimited_stream.rs index 1b6e30a9464e..68878da08670 100644 --- a/datafusion/core/src/physical_plan/file_format/delimited_stream.rs +++ b/datafusion/core/src/physical_plan/file_format/delimited_stream.rs @@ -68,7 +68,7 @@ impl LineDelimiter { } else if *is_quote { None } else { - (*v == NEWLINE).then(|| idx + 1) + (*v == NEWLINE).then_some(idx + 1) } }); diff --git a/datafusion/core/src/physical_plan/hash_join.rs b/datafusion/core/src/physical_plan/hash_join.rs index 8cb7445a24dd..a22bcbc13c7e 100644 --- a/datafusion/core/src/physical_plan/hash_join.rs +++ b/datafusion/core/src/physical_plan/hash_join.rs @@ -1240,12 +1240,12 @@ fn produce_from_matched( let indices = if unmatched { UInt64Array::from_iter_values( (0..visited_left_side.len()) - .filter_map(|v| (!visited_left_side.get_bit(v)).then(|| v as u64)), + .filter_map(|v| (!visited_left_side.get_bit(v)).then_some(v as u64)), ) } else { UInt64Array::from_iter_values( (0..visited_left_side.len()) - .filter_map(|v| (visited_left_side.get_bit(v)).then(|| v as u64)), + .filter_map(|v| (visited_left_side.get_bit(v)).then_some(v as u64)), ) };