"removing redundant match block"

This commit is contained in:
Jack Wright 2024-06-07 10:23:49 -07:00
parent 50ef22308e
commit c5ce675792

View File

@ -63,32 +63,16 @@ fn compute_with_value(
op: Span, op: Span,
right: &Value, right: &Value,
) -> Result<Value, ShellError> { ) -> Result<Value, ShellError> {
match right { let rhs = NuExpression::try_from_value(plugin, right)?;
Value::Custom { .. } => { with_operator(
let rhs = NuExpression::try_from_value(plugin, right)?; (plugin, engine),
with_operator( operator,
(plugin, engine), left,
operator, &rhs,
left, lhs_span,
&rhs, right.span(),
lhs_span, op,
right.span(), )
op,
)
}
_ => {
let rhs = NuExpression::try_from_value(plugin, right)?;
with_operator(
(plugin, engine),
operator,
left,
&rhs,
lhs_span,
right.span(),
op,
)
}
}
} }
fn with_operator( fn with_operator(