mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 12:55:05 +00:00
Implement IntoIterator
for FStringElements
(#11410)
A change which I lost somewhere when I force pushed in https://github.com/astral-sh/ruff/pull/11400
This commit is contained in:
parent
ca99e9e2f0
commit
c3c87e86ef
5 changed files with 26 additions and 8 deletions
|
@ -739,7 +739,7 @@ pub fn walk_pattern_keyword<'a, V: Visitor<'a> + ?Sized>(
|
|||
}
|
||||
|
||||
pub fn walk_f_string<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, f_string: &'a FString) {
|
||||
for f_string_element in f_string.elements.iter() {
|
||||
for f_string_element in &f_string.elements {
|
||||
visitor.visit_f_string_element(f_string_element);
|
||||
}
|
||||
}
|
||||
|
@ -756,7 +756,7 @@ pub fn walk_f_string_element<'a, V: Visitor<'a> + ?Sized>(
|
|||
{
|
||||
visitor.visit_expr(expression);
|
||||
if let Some(format_spec) = format_spec {
|
||||
for spec_element in format_spec.elements.iter() {
|
||||
for spec_element in &format_spec.elements {
|
||||
visitor.visit_f_string_element(spec_element);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue