From 2f5a77658baafad1fe3551971ebbcdce87760847 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Mon, 5 Apr 2021 21:17:35 +0200 Subject: Substitution::single -> from1 --- crates/hir_ty/src/lib.rs | 9 --------- 1 file changed, 9 deletions(-) (limited to 'crates/hir_ty/src/lib.rs') diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs index 928dd76e5..6d5123cf1 100644 --- a/crates/hir_ty/src/lib.rs +++ b/crates/hir_ty/src/lib.rs @@ -31,7 +31,6 @@ mod test_db; use std::sync::Arc; use itertools::Itertools; -use smallvec::SmallVec; use base_db::salsa; use hir_def::{ @@ -77,14 +76,6 @@ pub type ChalkTraitId = chalk_ir::TraitId; pub type FnSig = chalk_ir::FnSig; impl Substitution { - pub fn single(ty: Ty) -> Substitution { - Substitution::intern({ - let mut v = SmallVec::new(); - v.push(ty.cast(&Interner)); - v - }) - } - pub fn prefix(&self, n: usize) -> Substitution { Substitution::intern(self.interned()[..std::cmp::min(self.len(&Interner), n)].into()) } -- cgit v1.2.3