Rename ExprStringLiteral::as_unconcatenated_string() to ExprStringLiteral::as_single_part_string() (#16253)

This commit is contained in:
Alex Waygood 2025-02-19 16:06:57 +00:00 committed by GitHub
parent 97d0659ce3
commit 25920fe489
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 50 additions and 45 deletions

View file

@ -56,7 +56,7 @@ pub fn parse_type_annotation(
string_expr: &ExprStringLiteral,
source: &str,
) -> AnnotationParseResult {
if let Some(string_literal) = string_expr.as_unconcatenated_literal() {
if let Some(string_literal) = string_expr.as_single_part_string() {
// Compare the raw contents (without quotes) of the expression with the parsed contents
// contained in the string literal.
if &source[string_literal.content_range()] == string_literal.as_str() {