Reduce Symbol's interface slightly.

This commit is contained in:
Nicholas Nethercote
2019-05-09 14:06:10 +10:00
parent cb7eacb1d2
commit e53bb1aefb
+1 -5
View File
@@ -380,10 +380,6 @@ pub fn intern(string: &str) -> Self {
with_interner(|interner| interner.intern(string))
}
pub fn interned(self) -> Self {
with_interner(|interner| interner.interned(self))
}
/// Gensyms a new `usize`, using the current interner.
pub fn gensym(string: &str) -> Self {
with_interner(|interner| interner.gensym(string))
@@ -502,7 +498,7 @@ pub fn intern(&mut self, string: &str) -> Symbol {
name
}
pub fn interned(&self, symbol: Symbol) -> Symbol {
fn interned(&self, symbol: Symbol) -> Symbol {
if (symbol.0.as_usize()) < self.strings.len() {
symbol
} else {