diff options
author | Yoshua Wuyts <[email protected]> | 2021-04-17 15:39:03 +0100 |
---|---|---|
committer | Yoshua Wuyts <[email protected]> | 2021-04-17 15:39:03 +0100 |
commit | 5518a65037f862fc45e72f1256aa4994a6b14a57 (patch) | |
tree | 859f07bb1e1d35e4a74fea16a859ed5efd23f79c /crates/base_db | |
parent | fb2d284f28f70426e39e1b92d95bdbb217a48109 (diff) |
Add an error message to fixture errors
Diffstat (limited to 'crates/base_db')
-rw-r--r-- | crates/base_db/src/fixture.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/base_db/src/fixture.rs b/crates/base_db/src/fixture.rs index 04e2be390..30f85bf3a 100644 --- a/crates/base_db/src/fixture.rs +++ b/crates/base_db/src/fixture.rs | |||
@@ -54,7 +54,9 @@ pub trait WithFixture: Default + SourceDatabaseExt + 'static { | |||
54 | let fixture = ChangeFixture::parse(ra_fixture); | 54 | let fixture = ChangeFixture::parse(ra_fixture); |
55 | let mut db = Self::default(); | 55 | let mut db = Self::default(); |
56 | fixture.change.apply(&mut db); | 56 | fixture.change.apply(&mut db); |
57 | let (file_id, range_or_offset) = fixture.file_position.unwrap(); | 57 | let (file_id, range_or_offset) = fixture |
58 | .file_position | ||
59 | .expect("Could not find file position in fixture. Did you forget to add an `$0`?"); | ||
58 | (db, file_id, range_or_offset) | 60 | (db, file_id, range_or_offset) |
59 | } | 61 | } |
60 | 62 | ||