Remove Symbol::len
It is used exactly once and can be replaced with the equally fast .as_str().len()
This commit is contained in:
parent
ce45663e14
commit
9886c233d8
2 changed files with 1 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue