Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/infer/expr.rs')
-rw-r--r--crates/hir_ty/src/infer/expr.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs
index b0306d9148..f5bc898a85 100644
--- a/crates/hir_ty/src/infer/expr.rs
+++ b/crates/hir_ty/src/infer/expr.rs
@@ -264,10 +264,9 @@ impl<'a> InferenceContext<'a> {
// collect explicitly written argument types
for arg_type in arg_types.iter() {
- let arg_ty = if let Some(type_ref) = arg_type {
- self.make_ty(type_ref)
- } else {
- self.table.new_type_var()
+ let arg_ty = match arg_type {
+ Some(type_ref) => self.make_ty(type_ref),
+ None => self.table.new_type_var(),
};
sig_tys.push(arg_ty);
}