diff options
author | Aleksey Kladov <[email protected]> | 2020-06-23 17:46:56 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-06-23 17:46:56 +0100 |
commit | fdf86aee18e396d393d50df7df27b02111838507 (patch) | |
tree | 88cd35c526a926eb8c8a8645243209759a7bb7f9 /crates/ra_db/src | |
parent | 3486b47e5c4f71479cc3c876da1fd1dcbfcab257 (diff) |
Nicer API
Diffstat (limited to 'crates/ra_db/src')
-rw-r--r-- | crates/ra_db/src/fixture.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_db/src/fixture.rs b/crates/ra_db/src/fixture.rs index f786fb87f..6c13e62bb 100644 --- a/crates/ra_db/src/fixture.rs +++ b/crates/ra_db/src/fixture.rs | |||
@@ -61,7 +61,7 @@ use std::{str::FromStr, sync::Arc}; | |||
61 | 61 | ||
62 | use ra_cfg::CfgOptions; | 62 | use ra_cfg::CfgOptions; |
63 | use rustc_hash::FxHashMap; | 63 | use rustc_hash::FxHashMap; |
64 | use test_utils::{extract_offset, parse_fixture, FixtureEntry, CURSOR_MARKER}; | 64 | use test_utils::{extract_offset, Fixture, CURSOR_MARKER}; |
65 | use vfs::{file_set::FileSet, VfsPath}; | 65 | use vfs::{file_set::FileSet, VfsPath}; |
66 | 66 | ||
67 | use crate::{ | 67 | use crate::{ |
@@ -107,9 +107,9 @@ fn with_files( | |||
107 | db: &mut dyn SourceDatabaseExt, | 107 | db: &mut dyn SourceDatabaseExt, |
108 | fixture: &str, | 108 | fixture: &str, |
109 | ) -> (Option<FilePosition>, Vec<FileId>) { | 109 | ) -> (Option<FilePosition>, Vec<FileId>) { |
110 | let mut files = Vec::new(); | 110 | let fixture = Fixture::parse(fixture); |
111 | let fixture = parse_fixture(fixture); | ||
112 | 111 | ||
112 | let mut files = Vec::new(); | ||
113 | let mut crate_graph = CrateGraph::default(); | 113 | let mut crate_graph = CrateGraph::default(); |
114 | let mut crates = FxHashMap::default(); | 114 | let mut crates = FxHashMap::default(); |
115 | let mut crate_deps = Vec::new(); | 115 | let mut crate_deps = Vec::new(); |
@@ -201,8 +201,8 @@ struct FileMeta { | |||
201 | env: Env, | 201 | env: Env, |
202 | } | 202 | } |
203 | 203 | ||
204 | impl From<&FixtureEntry> for ParsedMeta { | 204 | impl From<&Fixture> for ParsedMeta { |
205 | fn from(f: &FixtureEntry) -> Self { | 205 | fn from(f: &Fixture) -> Self { |
206 | Self::File(FileMeta { | 206 | Self::File(FileMeta { |
207 | path: f.path.to_owned(), | 207 | path: f.path.to_owned(), |
208 | krate: f.crate_name.to_owned(), | 208 | krate: f.crate_name.to_owned(), |