From 78a21253b494e573885ac8336bff6e93b401046f Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Sun, 12 Jan 2020 00:40:36 +0200 Subject: Apply the api design suggestions --- crates/ra_assists/src/doc_tests.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_assists/src/doc_tests.rs') diff --git a/crates/ra_assists/src/doc_tests.rs b/crates/ra_assists/src/doc_tests.rs index 21bee228d..5dc1ee233 100644 --- a/crates/ra_assists/src/doc_tests.rs +++ b/crates/ra_assists/src/doc_tests.rs @@ -15,21 +15,21 @@ fn check(assist_id: &str, before: &str, after: &str) { let (db, file_id) = TestDB::with_single_file(&before); let frange = FileRange { file_id, range: selection.into() }; - let (_assist_id, action, _) = crate::assists(&db, frange) + let assist = crate::assists(&db, frange) .into_iter() - .find(|(id, _, _)| id.id.0 == assist_id) + .find(|assist| assist.label.id.0 == assist_id) .unwrap_or_else(|| { panic!( "\n\nAssist is not applicable: {}\nAvailable assists: {}", assist_id, crate::assists(&db, frange) .into_iter() - .map(|(id, _, _)| id.id.0) + .map(|assist| assist.label.id.0) .collect::>() .join(", ") ) }); - let actual = action.edit.apply(&before); + let actual = assist.get_first_action().edit.apply(&before); assert_eq_text!(after, &actual); } -- cgit v1.2.3