Skip to content

Commit 7a9230a

Browse files
fix: replace doc-comments with normal comments
Co-authored-by: Lukas Wirth <[email protected]>
1 parent f678613 commit 7a9230a

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

crates/ide_assists/src/handlers/convert_iter_for_each_to_for.rs

+20-20
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@ use syntax::{
66

77
use crate::{AssistContext, AssistId, AssistKind, Assists};
88

9-
/// Assist: convert_iter_for_each_to_for
9+
// Assist: convert_iter_for_each_to_for
1010
//
11-
/// Converts an Iterator::for_each function into a for loop.
12-
///
13-
/// ```rust
14-
/// fn main() {
15-
/// let vec = vec![(1, 2), (2, 3), (3, 4)];
16-
/// x.iter().for_each(|(x, y)| {
17-
/// println!("x: {}, y: {}", x, y);
18-
/// })
19-
/// }
20-
/// ```
21-
/// ->
22-
/// ```rust
23-
/// fn main() {
24-
/// let vec = vec![(1, 2), (2, 3), (3, 4)];
25-
/// for (x, y) in x.iter() {
26-
/// println!("x: {}, y: {}", x, y);
27-
/// });
28-
/// }
29-
/// ```
11+
// Converts an Iterator::for_each function into a for loop.
12+
//
13+
// ```rust
14+
// fn main() {
15+
// let vec = vec![(1, 2), (2, 3), (3, 4)];
16+
// x.iter().for_each(|(x, y)| {
17+
// println!("x: {}, y: {}", x, y);
18+
// });
19+
// }
20+
// ```
21+
// ->
22+
// ```rust
23+
// fn main() {
24+
// let vec = vec![(1, 2), (2, 3), (3, 4)];
25+
// for (x, y) in x.iter() {
26+
// println!("x: {}, y: {}", x, y);
27+
// }
28+
// }
29+
// ```
3030
pub(crate) fn convert_iter_for_each_to_for(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
3131
let method = ctx.find_node_at_offset::<ast::MethodCallExpr>()?;
3232
let stmt = method.syntax().parent().and_then(ast::ExprStmt::cast);

0 commit comments

Comments
 (0)