From 7a9230acdfe900d9e42f0b8cd37e4a7db6d8ff18 Mon Sep 17 00:00:00 2001 From: Luiz Carlos Date: Fri, 12 Mar 2021 08:44:03 -0300 Subject: fix: replace doc-comments with normal comments Co-authored-by: Lukas Wirth --- .../src/handlers/convert_iter_for_each_to_for.rs | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'crates/ide_assists/src') diff --git a/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs b/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs index 7e6cae9e1..661a3fbeb 100644 --- a/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs +++ b/crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs @@ -6,27 +6,27 @@ use syntax::{ use crate::{AssistContext, AssistId, AssistKind, Assists}; -/// Assist: convert_iter_for_each_to_for +// Assist: convert_iter_for_each_to_for // -/// Converts an Iterator::for_each function into a for loop. -/// -/// ```rust -/// fn main() { -/// let vec = vec![(1, 2), (2, 3), (3, 4)]; -/// x.iter().for_each(|(x, y)| { -/// println!("x: {}, y: {}", x, y); -/// }) -/// } -/// ``` -/// -> -/// ```rust -/// fn main() { -/// let vec = vec![(1, 2), (2, 3), (3, 4)]; -/// for (x, y) in x.iter() { -/// println!("x: {}, y: {}", x, y); -/// }); -/// } -/// ``` +// Converts an Iterator::for_each function into a for loop. +// +// ```rust +// fn main() { +// let vec = vec![(1, 2), (2, 3), (3, 4)]; +// x.iter().for_each(|(x, y)| { +// println!("x: {}, y: {}", x, y); +// }); +// } +// ``` +// -> +// ```rust +// fn main() { +// let vec = vec![(1, 2), (2, 3), (3, 4)]; +// for (x, y) in x.iter() { +// println!("x: {}, y: {}", x, y); +// } +// } +// ``` pub(crate) fn convert_iter_for_each_to_for(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { let method = ctx.find_node_at_offset::()?; let stmt = method.syntax().parent().and_then(ast::ExprStmt::cast); -- cgit v1.2.3