aboutsummaryrefslogtreecommitdiff
path: root/crates/test_utils/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/test_utils/src/lib.rs')
-rw-r--r--crates/test_utils/src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs
index 981565cd7..b1333cf15 100644
--- a/crates/test_utils/src/lib.rs
+++ b/crates/test_utils/src/lib.rs
@@ -168,13 +168,13 @@ pub struct FixtureEntry {
168 168
169#[derive(Debug, Eq, PartialEq)] 169#[derive(Debug, Eq, PartialEq)]
170pub enum FixtureMeta { 170pub enum FixtureMeta {
171 Root { path: RelativePathBuf }, 171 Root { path: String },
172 File(FileMeta), 172 File(FileMeta),
173} 173}
174 174
175#[derive(Debug, Eq, PartialEq)] 175#[derive(Debug, Eq, PartialEq)]
176pub struct FileMeta { 176pub struct FileMeta {
177 pub path: RelativePathBuf, 177 pub path: String,
178 pub crate_name: Option<String>, 178 pub crate_name: Option<String>,
179 pub deps: Vec<String>, 179 pub deps: Vec<String>,
180 pub cfg: CfgOptions, 180 pub cfg: CfgOptions,
@@ -183,7 +183,7 @@ pub struct FileMeta {
183} 183}
184 184
185impl FixtureMeta { 185impl FixtureMeta {
186 pub fn path(&self) -> &RelativePath { 186 pub fn path(&self) -> &str {
187 match self { 187 match self {
188 FixtureMeta::Root { path } => &path, 188 FixtureMeta::Root { path } => &path,
189 FixtureMeta::File(f) => &f.path, 189 FixtureMeta::File(f) => &f.path,
@@ -292,12 +292,12 @@ fn parse_meta(meta: &str) -> FixtureMeta {
292 let components = meta.split_ascii_whitespace().collect::<Vec<_>>(); 292 let components = meta.split_ascii_whitespace().collect::<Vec<_>>();
293 293
294 if components[0] == "root" { 294 if components[0] == "root" {
295 let path: RelativePathBuf = components[1].into(); 295 let path = components[1].to_string();
296 assert!(path.starts_with("/") && path.ends_with("/")); 296 assert!(path.starts_with("/") && path.ends_with("/"));
297 return FixtureMeta::Root { path }; 297 return FixtureMeta::Root { path };
298 } 298 }
299 299
300 let path: RelativePathBuf = components[0].into(); 300 let path = components[0].to_string();
301 assert!(path.starts_with("/")); 301 assert!(path.starts_with("/"));
302 302
303 let mut krate = None; 303 let mut krate = None;