aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/tests.rs')
-rw-r--r--crates/ra_assists/src/tests.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_assists/src/tests.rs b/crates/ra_assists/src/tests.rs
index 483e11931..dd9026df6 100644
--- a/crates/ra_assists/src/tests.rs
+++ b/crates/ra_assists/src/tests.rs
@@ -118,8 +118,7 @@ fn check(assist: Handler, before: &str, expected: ExpectedResult) {
118 assert_eq_text!(after, &actual); 118 assert_eq_text!(after, &actual);
119 } 119 }
120 (Some(assist), ExpectedResult::Target(target)) => { 120 (Some(assist), ExpectedResult::Target(target)) => {
121 let action = assist.0[0].action.clone().unwrap(); 121 let range = assist.0[0].label.target;
122 let range = action.target.expect("expected target on action");
123 assert_eq_text!(&text_without_caret[range], target); 122 assert_eq_text!(&text_without_caret[range], target);
124 } 123 }
125 (Some(_), ExpectedResult::NotApplicable) => panic!("assist should not be applicable!"), 124 (Some(_), ExpectedResult::NotApplicable) => panic!("assist should not be applicable!"),