Skip to content

Commit

Permalink
Fix clippy warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
vakaras committed Jul 27, 2023
1 parent 727a0d9 commit 4428054
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions vir/defs/polymorphic/ast/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ impl fmt::Display for PermAmount {
}
}

#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
impl PartialOrd for PermAmount {
fn partial_cmp(&self, other: &PermAmount) -> Option<Ordering> {
match (self, other) {
Expand Down
7 changes: 1 addition & 6 deletions vir/defs/polymorphic/ast/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ impl fmt::Display for Function {

impl Function {
pub fn inline_body(&self, args: Vec<Expr>) -> Expr {
let subst: FxHashMap<LocalVar, Expr> = self
.formal_args
.iter()
.cloned()
.zip(args.into_iter())
.collect();
let subst: FxHashMap<LocalVar, Expr> = self.formal_args.iter().cloned().zip(args).collect();
// TODO: this does not handle let expressions, quantifiers, and so on
self.body.clone().unwrap().fold_expr(|orig_expr| {
if let Expr::Local(Local { ref variable, .. }) = orig_expr {
Expand Down

0 comments on commit 4428054

Please sign in to comment.