mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-16 08:30:16 +00:00
refactor: Rename FormatStringContinuation
to FormatImplicitConcatenatedString
(#13531)
This commit is contained in:
parent
c046101b79
commit
253f5f269a
6 changed files with 40 additions and 23 deletions
|
@ -118,6 +118,24 @@ impl<'a> From<&AnyString<'a>> for ExpressionRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a ExprBytesLiteral> for AnyString<'a> {
|
||||
fn from(value: &'a ExprBytesLiteral) -> Self {
|
||||
AnyString::Bytes(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a ExprStringLiteral> for AnyString<'a> {
|
||||
fn from(value: &'a ExprStringLiteral) -> Self {
|
||||
AnyString::String(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a ExprFString> for AnyString<'a> {
|
||||
fn from(value: &'a ExprFString) -> Self {
|
||||
AnyString::FString(value)
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) enum AnyStringPartsIter<'a> {
|
||||
String(std::slice::Iter<'a, StringLiteral>),
|
||||
Bytes(std::slice::Iter<'a, ast::BytesLiteral>),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue