remove unused Scope functions

This commit is contained in:
Folkert 2022-04-27 19:53:30 +02:00
parent 34d77cffdb
commit 7af2bb343c
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 1 additions and 24 deletions

View file

@ -106,10 +106,6 @@ impl IdentStore {
self.symbols.push(symbol);
self.regions.push(region);
}
fn len(&self) -> usize {
self.idents.len()
}
}
#[derive(Clone, Debug)]
@ -188,18 +184,6 @@ impl Scope {
}
}
pub fn symbols(&self) -> impl Iterator<Item = (&Symbol, &Region)> {
self.idents.symbols.iter().zip(self.idents.regions.iter())
}
pub fn contains_ident(&self, ident: &Ident) -> bool {
self.idents.get_index(ident).is_some()
}
pub fn num_idents(&self) -> usize {
self.idents.len()
}
pub fn lookup(&self, ident: &Ident, region: Region) -> Result<Symbol, RuntimeError> {
match self.idents.get_symbol(ident) {
Some(symbol) => Ok(symbol),
@ -369,7 +353,7 @@ impl Scope {
let original_symbol = self.idents.symbols[index];
let original_region = self.idents.regions[index];
let shadow_ident_id = all_ident_ids.add(ident.clone());
let shadow_ident_id = all_ident_ids.add_ident(&ident);
let shadow_symbol = Symbol::new(self.home, shadow_ident_id);
if self.abilities_store.is_ability_member_name(original_symbol) {

View file

@ -58,13 +58,6 @@ impl<K: PartialEq, V> VecMap<K, V> {
self.keys.contains(key)
}
pub fn get(&self, key: &K) -> Option<&V> {
match self.keys.iter().position(|k| k == key) {
None => None,
Some(index) => Some(&self.values[index]),
}
}
pub fn remove(&mut self, key: &K) {
match self.keys.iter().position(|x| x == key) {
None => {