aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/lib.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-05 20:49:27 +0100
committerFlorian Diebold <[email protected]>2021-04-05 20:58:03 +0100
commit2a83645e1bb01578c4bbe5f71418d354108dfd77 (patch)
tree89d0dcb3b3b3eb511fe717c2d0aeb268095b5221 /crates/hir_ty/src/lib.rs
parentb443e5304ec43ae2049c72b694ff62baf4314cbb (diff)
Get rid of Substitution::suffix
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r--crates/hir_ty/src/lib.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs
index 2c70c4277..abdcf8829 100644
--- a/crates/hir_ty/src/lib.rs
+++ b/crates/hir_ty/src/lib.rs
@@ -79,12 +79,6 @@ impl Substitution {
79 pub fn prefix(&self, n: usize) -> Substitution { 79 pub fn prefix(&self, n: usize) -> Substitution {
80 Substitution::intern(self.interned()[..std::cmp::min(self.len(&Interner), n)].into()) 80 Substitution::intern(self.interned()[..std::cmp::min(self.len(&Interner), n)].into())
81 } 81 }
82
83 pub fn suffix(&self, n: usize) -> Substitution {
84 Substitution::intern(
85 self.interned()[self.len(&Interner) - std::cmp::min(self.len(&Interner), n)..].into(),
86 )
87 }
88} 82}
89 83
90/// Return an index of a parameter in the generic type parameter list by it's id. 84/// Return an index of a parameter in the generic type parameter list by it's id.