Auto merge of #59227 - Zoxc:fix-get, r=eddyb
Fix lifetime on LocalInternedString::get function cc @eddyb @nnethercote
This commit is contained in:
commit
cd8b437362
5 changed files with 23 additions and 17 deletions
|
@ -2165,9 +2165,11 @@ impl<'a> Parser<'a> {
|
|||
suffix,
|
||||
) = self.token {
|
||||
let suffix = suffix.and_then(|s| {
|
||||
let s = s.as_str().get();
|
||||
if ["f32", "f64"].contains(&s) {
|
||||
Some(s)
|
||||
let s = s.as_str();
|
||||
if s == "f32" {
|
||||
Some("f32")
|
||||
} else if s == "f64" {
|
||||
Some("f64")
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue