mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
remove unused Scope functions
This commit is contained in:
parent
34d77cffdb
commit
7af2bb343c
2 changed files with 1 additions and 24 deletions
|
@ -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) {
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue