summaryrefslogtreecommitdiff
path: root/dhall/src/typecheck.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src/typecheck.rs')
-rw-r--r--dhall/src/typecheck.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/dhall/src/typecheck.rs b/dhall/src/typecheck.rs
index 5230aab..998d3ca 100644
--- a/dhall/src/typecheck.rs
+++ b/dhall/src/typecheck.rs
@@ -419,10 +419,9 @@ pub fn type_with(
None => Err(mkerr(UnboundVariable)),
},
App(f, args) => {
- let mut iter = args.into_iter();
let mut seen_args: Vec<SubExpr<_, _>> = vec![];
let mut tf = f.get_type().clone();
- while let Some(a) = iter.next() {
+ for a in args {
seen_args.push(a.as_expr().clone());
let (x, tx, tb) = ensure_matches!(tf,
Pi(x, tx, tb) => (x, tx, tb),
@@ -656,7 +655,7 @@ impl<S> TypeError<S> {
) -> Self {
TypeError {
context: context.clone(),
- current: current,
+ current,
type_message,
}
}