diff options
author | Laurențiu Nicola <[email protected]> | 2021-03-08 20:19:44 +0000 |
---|---|---|
committer | Laurențiu Nicola <[email protected]> | 2021-03-08 20:19:44 +0000 |
commit | fc9eed4836dfc88fe2893c81b015ab440cea2ba6 (patch) | |
tree | 3905029a42c8bb6c5d363753b34cd6b5dd43f4d5 /crates/ide_assists/src/handlers/replace_for_loop_with_for_each.rs | |
parent | c5189a22ccf4c28e309e4189defbb88b83bb2aea (diff) |
Use upstream cov-mark
Diffstat (limited to 'crates/ide_assists/src/handlers/replace_for_loop_with_for_each.rs')
-rw-r--r-- | crates/ide_assists/src/handlers/replace_for_loop_with_for_each.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ide_assists/src/handlers/replace_for_loop_with_for_each.rs b/crates/ide_assists/src/handlers/replace_for_loop_with_for_each.rs index 27da28bc0..50b05ab0b 100644 --- a/crates/ide_assists/src/handlers/replace_for_loop_with_for_each.rs +++ b/crates/ide_assists/src/handlers/replace_for_loop_with_for_each.rs | |||
@@ -3,7 +3,6 @@ use hir::known; | |||
3 | use ide_db::helpers::FamousDefs; | 3 | use ide_db::helpers::FamousDefs; |
4 | use stdx::format_to; | 4 | use stdx::format_to; |
5 | use syntax::{ast, AstNode}; | 5 | use syntax::{ast, AstNode}; |
6 | use test_utils::mark; | ||
7 | 6 | ||
8 | use crate::{AssistContext, AssistId, AssistKind, Assists}; | 7 | use crate::{AssistContext, AssistId, AssistKind, Assists}; |
9 | 8 | ||
@@ -34,7 +33,7 @@ pub(crate) fn replace_for_loop_with_for_each(acc: &mut Assists, ctx: &AssistCont | |||
34 | let pat = for_loop.pat()?; | 33 | let pat = for_loop.pat()?; |
35 | let body = for_loop.loop_body()?; | 34 | let body = for_loop.loop_body()?; |
36 | if body.syntax().text_range().start() < ctx.offset() { | 35 | if body.syntax().text_range().start() < ctx.offset() { |
37 | mark::hit!(not_available_in_body); | 36 | cov_mark::hit!(not_available_in_body); |
38 | return None; | 37 | return None; |
39 | } | 38 | } |
40 | 39 | ||
@@ -187,7 +186,7 @@ fn main() { | |||
187 | 186 | ||
188 | #[test] | 187 | #[test] |
189 | fn not_available_in_body() { | 188 | fn not_available_in_body() { |
190 | mark::check!(not_available_in_body); | 189 | cov_mark::check!(not_available_in_body); |
191 | check_assist_not_applicable( | 190 | check_assist_not_applicable( |
192 | replace_for_loop_with_for_each, | 191 | replace_for_loop_with_for_each, |
193 | r" | 192 | r" |