Remove Symbol::len

It is used exactly once and can be replaced with the equally fast
.as_str().len()
This commit is contained in:
bjorn3 2021-09-18 18:01:36 +02:00
parent ce45663e14
commit 9886c233d8
2 changed files with 1 additions and 5 deletions

View file

@ -577,7 +577,7 @@ impl server::Literal for Rustc<'_> {
}
// Synthesize a new symbol that includes the minus sign.
let symbol = Symbol::intern(&s[..1 + lit.symbol.len()]);
let symbol = Symbol::intern(&s[..1 + lit.symbol.as_str().len()]);
lit = token::Lit::new(lit.kind, symbol, lit.suffix);
}