From 584d1c9e5bc39402e2855d0ffa9394ae5a066060 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 4 Apr 2021 12:48:10 +0200 Subject: Replace last uses of SubstsBuilder by TyBuilder --- crates/hir_ty/src/infer/unify.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'crates/hir_ty/src/infer/unify.rs') diff --git a/crates/hir_ty/src/infer/unify.rs b/crates/hir_ty/src/infer/unify.rs index d2496db3b..a04b935ef 100644 --- a/crates/hir_ty/src/infer/unify.rs +++ b/crates/hir_ty/src/infer/unify.rs @@ -186,14 +186,11 @@ pub(crate) fn unify(tys: &Canonical<(Ty, Ty)>) -> Option { ); } } - Some( - Substitution::builder(tys.binders.len(&Interner)) - .fill( - vars.iter(&Interner) - .map(|v| table.resolve_ty_completely(v.assert_ty_ref(&Interner).clone())), - ) - .build(), - ) + Some(Substitution::from_iter( + &Interner, + vars.iter(&Interner) + .map(|v| table.resolve_ty_completely(v.assert_ty_ref(&Interner).clone())), + )) } #[derive(Clone, Debug)] -- cgit v1.2.3