From 406d96c7d4c3a78d42b58a91ba633333ec37d487 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 28 Feb 2021 21:11:41 +0300 Subject: Use consistent naming for assist --- crates/ide_assists/src/tests/generated.rs | 46 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'crates/ide_assists/src/tests/generated.rs') diff --git a/crates/ide_assists/src/tests/generated.rs b/crates/ide_assists/src/tests/generated.rs index 7f6dbbccf..4f007aa48 100644 --- a/crates/ide_assists/src/tests/generated.rs +++ b/crates/ide_assists/src/tests/generated.rs @@ -192,29 +192,6 @@ pub(crate) fn frobnicate() {} ) } -#[test] -fn doctest_convert_for_to_iter_for_each() { - check_doc_test( - "convert_for_to_iter_for_each", - r#####" -fn main() { - let x = vec![1, 2, 3]; - for $0v in x { - let y = v * 2; - } -} -"#####, - r#####" -fn main() { - let x = vec![1, 2, 3]; - x.into_iter().for_each(|v| { - let y = v * 2; - }); -} -"#####, - ) -} - #[test] fn doctest_convert_integer_literal() { check_doc_test( @@ -1179,6 +1156,29 @@ impl Debug for S { ) } +#[test] +fn doctest_replace_for_loop_with_for_each() { + check_doc_test( + "replace_for_loop_with_for_each", + r#####" +fn main() { + let x = vec![1, 2, 3]; + for$0 v in x { + let y = v * 2; + } +} +"#####, + r#####" +fn main() { + let x = vec![1, 2, 3]; + x.into_iter().for_each(|v| { + let y = v * 2; + }); +} +"#####, + ) +} + #[test] fn doctest_replace_if_let_with_match() { check_doc_test( -- cgit v1.2.3