From 6996ec860bde7e6186ba8609b68ef51b8713e2ea Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 23 Jun 2020 18:17:43 +0200 Subject: Drop rarely used fixture functionality --- crates/test_utils/src/fixture.rs | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'crates/test_utils') 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 { #[derive(Debug, Eq, PartialEq)] pub enum FixtureMeta { - Root { path: String }, File(FileMeta), } @@ -27,7 +26,6 @@ pub struct FileMeta { impl FixtureMeta { pub fn path(&self) -> &str { match self { - FixtureMeta::Root { path } => &path, FixtureMeta::File(f) => &f.path, } } @@ -35,21 +33,18 @@ impl FixtureMeta { pub fn crate_name(&self) -> Option<&String> { match self { FixtureMeta::File(f) => f.crate_name.as_ref(), - _ => None, } } pub fn cfg_options(&self) -> Option<&CfgOptions> { match self { FixtureMeta::File(f) => Some(&f.cfg), - _ => None, } } pub fn edition(&self) -> Option<&String> { match self { FixtureMeta::File(f) => f.edition.as_ref(), - _ => None, } } @@ -63,7 +58,6 @@ impl FixtureMeta { Self { iter: match meta { FixtureMeta::File(f) => Some(f.env.iter()), - _ => None, }, } } @@ -146,12 +140,6 @@ The offending line: {:?}"#, fn parse_meta(meta: &str) -> FixtureMeta { let components = meta.split_ascii_whitespace().collect::>(); - if components[0] == "root" { - let path = components[1].to_string(); - assert!(path.starts_with("/") && path.ends_with("/")); - return FixtureMeta::Root { path }; - } - let path = components[0].to_string(); assert!(path.starts_with("/")); -- cgit v1.2.3