aboutsummaryrefslogtreecommitdiff
path: root/crates/test_utils/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/test_utils/src')
-rw-r--r--crates/test_utils/src/fixture.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/crates/test_utils/src/fixture.rs b/crates/test_utils/src/fixture.rs
index d0a732031..0dbeb01b1 100644
--- a/crates/test_utils/src/fixture.rs
+++ b/crates/test_utils/src/fixture.rs
@@ -10,7 +10,6 @@ pub struct FixtureEntry {
10 10
11#[derive(Debug, Eq, PartialEq)] 11#[derive(Debug, Eq, PartialEq)]
12pub enum FixtureMeta { 12pub enum FixtureMeta {
13 Root { path: String },
14 File(FileMeta), 13 File(FileMeta),
15} 14}
16 15
@@ -27,7 +26,6 @@ pub struct FileMeta {
27impl FixtureMeta { 26impl FixtureMeta {
28 pub fn path(&self) -> &str { 27 pub fn path(&self) -> &str {
29 match self { 28 match self {
30 FixtureMeta::Root { path } => &path,
31 FixtureMeta::File(f) => &f.path, 29 FixtureMeta::File(f) => &f.path,
32 } 30 }
33 } 31 }
@@ -35,21 +33,18 @@ impl FixtureMeta {
35 pub fn crate_name(&self) -> Option<&String> { 33 pub fn crate_name(&self) -> Option<&String> {
36 match self { 34 match self {
37 FixtureMeta::File(f) => f.crate_name.as_ref(), 35 FixtureMeta::File(f) => f.crate_name.as_ref(),
38 _ => None,
39 } 36 }
40 } 37 }
41 38
42 pub fn cfg_options(&self) -> Option<&CfgOptions> { 39 pub fn cfg_options(&self) -> Option<&CfgOptions> {
43 match self { 40 match self {
44 FixtureMeta::File(f) => Some(&f.cfg), 41 FixtureMeta::File(f) => Some(&f.cfg),
45 _ => None,
46 } 42 }
47 } 43 }
48 44
49 pub fn edition(&self) -> Option<&String> { 45 pub fn edition(&self) -> Option<&String> {
50 match self { 46 match self {
51 FixtureMeta::File(f) => f.edition.as_ref(), 47 FixtureMeta::File(f) => f.edition.as_ref(),
52 _ => None,
53 } 48 }
54 } 49 }
55 50
@@ -63,7 +58,6 @@ impl FixtureMeta {
63 Self { 58 Self {
64 iter: match meta { 59 iter: match meta {
65 FixtureMeta::File(f) => Some(f.env.iter()), 60 FixtureMeta::File(f) => Some(f.env.iter()),
66 _ => None,
67 }, 61 },
68 } 62 }
69 } 63 }
@@ -146,12 +140,6 @@ The offending line: {:?}"#,
146fn parse_meta(meta: &str) -> FixtureMeta { 140fn parse_meta(meta: &str) -> FixtureMeta {
147 let components = meta.split_ascii_whitespace().collect::<Vec<_>>(); 141 let components = meta.split_ascii_whitespace().collect::<Vec<_>>();
148 142
149 if components[0] == "root" {
150 let path = components[1].to_string();
151 assert!(path.starts_with("/") && path.ends_with("/"));
152 return FixtureMeta::Root { path };
153 }
154
155 let path = components[0].to_string(); 143 let path = components[0].to_string();
156 assert!(path.starts_with("/")); 144 assert!(path.starts_with("/"));
157 145