mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Replace a couple for loops with .for_each
I will not be explaining why (maybe unless you ask me)
This commit is contained in:
parent
f4dd70604c
commit
0017480467
1 changed files with 6 additions and 6 deletions
|
@ -326,9 +326,9 @@ impl_visit_parse_modes! {
|
||||||
|
|
||||||
impl VisitParseModes for AnswerInlineQuery {
|
impl VisitParseModes for AnswerInlineQuery {
|
||||||
fn visit_parse_modes(&mut self, mut visitor: impl FnMut(&mut Option<ParseMode>)) {
|
fn visit_parse_modes(&mut self, mut visitor: impl FnMut(&mut Option<ParseMode>)) {
|
||||||
for result in &mut self.results {
|
self.results
|
||||||
visit_parse_modes_in_inline_query_result(result, &mut visitor);
|
.iter_mut()
|
||||||
}
|
.for_each(|result| visit_parse_modes_in_inline_query_result(result, &mut visitor))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,9 +340,9 @@ impl VisitParseModes for AnswerWebAppQuery {
|
||||||
|
|
||||||
impl VisitParseModes for SendMediaGroup {
|
impl VisitParseModes for SendMediaGroup {
|
||||||
fn visit_parse_modes(&mut self, mut visitor: impl FnMut(&mut Option<ParseMode>)) {
|
fn visit_parse_modes(&mut self, mut visitor: impl FnMut(&mut Option<ParseMode>)) {
|
||||||
for media in &mut self.media {
|
self.media
|
||||||
visit_parse_modes_in_input_media(media, &mut visitor);
|
.iter_mut()
|
||||||
}
|
.for_each(|media| visit_parse_modes_in_input_media(media, &mut visitor))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue