1
Fork 0

Fix lifetime on LocalInternedString::get function

This commit is contained in:
John Kåre Alsaker 2019-03-16 08:50:19 +01:00
parent befeeb7c08
commit 438f6b04c6
4 changed files with 20 additions and 11 deletions

View file

@ -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
}