Merge pull request #7151 from hrishisd/deprecate-old-str-interpolation

Remove deprecated string interpolation syntax #7148
This commit is contained in:
Luke Boswell 2024-10-09 11:21:18 +11:00 committed by GitHub
commit 0271f2eeb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 17 additions and 94 deletions

View file

@ -649,13 +649,6 @@ fn normalize_str_segments<'a>(
}
new_segments.push(StrSegment::Interpolated(e.normalize(arena)));
}
StrSegment::DeprecatedInterpolated(e) => {
if !last_text.is_empty() {
let text = std::mem::replace(last_text, String::new_in(arena));
new_segments.push(StrSegment::Plaintext(text.into_bump_str()));
}
new_segments.push(StrSegment::Interpolated(e.normalize(arena)));
}
}
}
}
@ -680,7 +673,6 @@ impl<'a> Normalize<'a> for StrSegment<'a> {
StrSegment::Unicode(t) => StrSegment::Unicode(t.normalize(arena)),
StrSegment::EscapedChar(c) => StrSegment::EscapedChar(c),
StrSegment::Interpolated(t) => StrSegment::Interpolated(t.normalize(arena)),
StrSegment::DeprecatedInterpolated(t) => StrSegment::Interpolated(t.normalize(arena)),
}
}
}