mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 21:15:18 +03:00
Reduce Symbol's interface slightly.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user