diff options
author | Florian Diebold <[email protected]> | 2021-04-05 20:49:27 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-05 20:58:03 +0100 |
commit | 2a83645e1bb01578c4bbe5f71418d354108dfd77 (patch) | |
tree | 89d0dcb3b3b3eb511fe717c2d0aeb268095b5221 /crates/hir_ty/src/lib.rs | |
parent | b443e5304ec43ae2049c72b694ff62baf4314cbb (diff) |
Get rid of Substitution::suffix
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r-- | crates/hir_ty/src/lib.rs | 6 |
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. |