Skip to content

Commit 05f8509

Browse files
committed
Fix 1.64 clippy warnings
1 parent f712c94 commit 05f8509

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

core/src/ast.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,8 @@ pub(crate) fn resolve_identifier<I: Interrupt>(
516516
};
517517
}
518518
if let Some(scope) = scope.clone() {
519-
match scope.get(ident, context, int)? {
520-
Some(val) => return Ok(val),
521-
None => (),
519+
if let Some(val) = scope.get(ident, context, int)? {
520+
return Ok(val);
522521
}
523522
}
524523
if let Some(val) = context.variables.get(ident.as_str()) {

core/src/num/unit.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -731,10 +731,7 @@ impl Value {
731731
}
732732

733733
// remove units with exponent == 0
734-
res_components = res_components
735-
.into_iter()
736-
.filter(|unit_exponent| unit_exponent.exponent != 0.into())
737-
.collect();
734+
res_components.retain(|unit_exponent| unit_exponent.exponent != 0.into());
738735

739736
Ok(Self {
740737
value: res_value,

core/src/value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ impl Value {
370370
});
371371
}
372372
Self::Fn(name, expr, _scope) => {
373-
let expr_str = (&**expr).format(ctx, int)?;
373+
let expr_str = expr.format(ctx, int)?;
374374
let res = if name.as_str().contains('.') {
375375
format!("{name}:{expr_str}")
376376
} else {

0 commit comments

Comments
 (0)