Complete editable private items

This commit is contained in:
Jonas Schievink 2021-07-23 19:57:16 +02:00
parent 75d7da196f
commit 3efdf6861f
6 changed files with 107 additions and 38 deletions

View file

@ -74,7 +74,7 @@ pub struct Fixture {
pub cfg_key_values: Vec<(String, String)>,
pub edition: Option<String>,
pub env: FxHashMap<String, String>,
pub introduce_new_source_root: bool,
pub introduce_new_source_root: Option<String>,
}
pub struct MiniCore {
@ -162,7 +162,7 @@ impl Fixture {
let mut cfg_atoms = Vec::new();
let mut cfg_key_values = Vec::new();
let mut env = FxHashMap::default();
let mut introduce_new_source_root = false;
let mut introduce_new_source_root = None;
for component in components[1..].iter() {
let (key, value) = component
.split_once(':')
@ -186,7 +186,7 @@ impl Fixture {
}
}
}
"new_source_root" => introduce_new_source_root = true,
"new_source_root" => introduce_new_source_root = Some(value.to_string()),
_ => panic!("bad component: {:?}", component),
}
}