diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-17 20:37:59 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-17 20:37:59 +0100 |
commit | 19fc1f333f64e76784ced4ea185e62329d0defb6 (patch) | |
tree | f493e017bda49ae6ac2517530bbea56b6f6c0189 /crates/base_db/src/fixture.rs | |
parent | eb38dc704fc6ac14059e61485467ce9ddf32a08c (diff) | |
parent | 58a6ec549d638455f5b5447bbbc174993e51e288 (diff) |
Merge #8559
8559: Add some more error messages to fixture failure cases r=Veykril a=Veykril
Follow up for #8557
bors r+
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/base_db/src/fixture.rs')
-rw-r--r-- | crates/base_db/src/fixture.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/base_db/src/fixture.rs b/crates/base_db/src/fixture.rs index 30f85bf3a..0132565e4 100644 --- a/crates/base_db/src/fixture.rs +++ b/crates/base_db/src/fixture.rs | |||
@@ -35,7 +35,7 @@ pub trait WithFixture: Default + SourceDatabaseExt + 'static { | |||
35 | fn with_position(ra_fixture: &str) -> (Self, FilePosition) { | 35 | fn with_position(ra_fixture: &str) -> (Self, FilePosition) { |
36 | let (db, file_id, range_or_offset) = Self::with_range_or_offset(ra_fixture); | 36 | let (db, file_id, range_or_offset) = Self::with_range_or_offset(ra_fixture); |
37 | let offset = match range_or_offset { | 37 | let offset = match range_or_offset { |
38 | RangeOrOffset::Range(_) => panic!(), | 38 | RangeOrOffset::Range(_) => panic!("Expected a cursor position, got a range instead"), |
39 | RangeOrOffset::Offset(it) => it, | 39 | RangeOrOffset::Offset(it) => it, |
40 | }; | 40 | }; |
41 | (db, FilePosition { file_id, offset }) | 41 | (db, FilePosition { file_id, offset }) |
@@ -45,7 +45,7 @@ pub trait WithFixture: Default + SourceDatabaseExt + 'static { | |||
45 | let (db, file_id, range_or_offset) = Self::with_range_or_offset(ra_fixture); | 45 | let (db, file_id, range_or_offset) = Self::with_range_or_offset(ra_fixture); |
46 | let range = match range_or_offset { | 46 | let range = match range_or_offset { |
47 | RangeOrOffset::Range(it) => it, | 47 | RangeOrOffset::Range(it) => it, |
48 | RangeOrOffset::Offset(_) => panic!(), | 48 | RangeOrOffset::Offset(_) => panic!("Expected a cursor range, got a position instead"), |
49 | }; | 49 | }; |
50 | (db, FileRange { file_id, range }) | 50 | (db, FileRange { file_id, range }) |
51 | } | 51 | } |