Skip to content

Commit c02d689

Browse files
committed
Inline Symbol::decode and Interner::intern.
1 parent ab90617 commit c02d689

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_span/symbol.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,7 @@ impl Encodable for Symbol {
993993
}
994994

995995
impl Decodable for Symbol {
996+
#[inline]
996997
fn decode<D: Decoder>(d: &mut D) -> Result<Symbol, D::Error> {
997998
Ok(Symbol::intern(&d.read_str()?))
998999
}
@@ -1031,6 +1032,7 @@ impl Interner {
10311032
}
10321033
}
10331034

1035+
#[inline]
10341036
pub fn intern(&mut self, string: &str) -> Symbol {
10351037
if let Some(&name) = self.names.get(string) {
10361038
return name;

0 commit comments

Comments
 (0)