Satisfy msrv by removing then_some.
This commit is contained in:
@@ -1137,7 +1137,7 @@ fn optimize_expr(expr: &mut Expr, state: &mut OptimizerState, _chaining: bool) {
|
||||
_ if x.args.len() == 2 && x.op_token.is_some() && (state.engine.fast_operators() || !state.engine.has_native_fn_override(x.hashes.native(), &arg_types)) => {
|
||||
if let Some(result) = get_builtin_binary_op_fn(x.op_token.as_ref().unwrap(), &arg_values[0], &arg_values[1])
|
||||
.and_then(|(f, ctx)| {
|
||||
let context = ctx.then_some((state.engine, x.name.as_str(), None, &state.global, *pos).into());
|
||||
let context = ctx.then(|| (state.engine, x.name.as_str(), None, &state.global, *pos).into());
|
||||
let (first, second) = arg_values.split_first_mut().unwrap();
|
||||
(f)(context, &mut [ first, &mut second[0] ]).ok()
|
||||
}) {
|
||||
|
Reference in New Issue
Block a user