diff options
Diffstat (limited to 'crates/ide_db/src/call_info')
-rw-r--r-- | crates/ide_db/src/call_info/tests.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ide_db/src/call_info/tests.rs b/crates/ide_db/src/call_info/tests.rs index 1aeda08e5..b585085f3 100644 --- a/crates/ide_db/src/call_info/tests.rs +++ b/crates/ide_db/src/call_info/tests.rs | |||
@@ -1,6 +1,5 @@ | |||
1 | use base_db::{fixture::ChangeFixture, FilePosition}; | 1 | use base_db::{fixture::ChangeFixture, FilePosition}; |
2 | use expect_test::{expect, Expect}; | 2 | use expect_test::{expect, Expect}; |
3 | use test_utils::RangeOrOffset; | ||
4 | 3 | ||
5 | use crate::RootDatabase; | 4 | use crate::RootDatabase; |
6 | 5 | ||
@@ -10,10 +9,7 @@ pub(crate) fn position(ra_fixture: &str) -> (RootDatabase, FilePosition) { | |||
10 | let mut database = RootDatabase::default(); | 9 | let mut database = RootDatabase::default(); |
11 | database.apply_change(change_fixture.change); | 10 | database.apply_change(change_fixture.change); |
12 | let (file_id, range_or_offset) = change_fixture.file_position.expect("expected a marker ($0)"); | 11 | let (file_id, range_or_offset) = change_fixture.file_position.expect("expected a marker ($0)"); |
13 | let offset = match range_or_offset { | 12 | let offset = range_or_offset.expect_offset(); |
14 | RangeOrOffset::Range(_) => panic!(), | ||
15 | RangeOrOffset::Offset(it) => it, | ||
16 | }; | ||
17 | (database, FilePosition { file_id, offset }) | 13 | (database, FilePosition { file_id, offset }) |
18 | } | 14 | } |
19 | 15 | ||