diff --git a/src/target_config.rs b/src/target_config.rs index c9cf88a..7af69cf 100644 --- a/src/target_config.rs +++ b/src/target_config.rs @@ -10,7 +10,6 @@ pub struct TargetConfig { pub linker_flags: Vec, pub linker_libs: Vec, pub sources: Vec, - pub sources_cmd: String, pub is_default: bool, } @@ -25,7 +24,6 @@ impl TargetConfig { linker_flags: Vec::new(), linker_libs: Vec::new(), sources: Vec::new(), - sources_cmd: String::from(""), is_default: false, } } @@ -118,13 +116,6 @@ impl TargetConfig { panic!("fatal: {k} invalid type, must be a array of strings."); } } - "sources_cmd" => { - if let Value::String(s) = table.get(k).unwrap() { - ret.sources_cmd = s.to_owned(); - } else { - panic!("fatal: {k} invalid type, must be a string."); - } - } "default" => { if let Value::Boolean(b) = table.get(k).unwrap() { ret.is_default = *b; @@ -145,11 +136,8 @@ impl TargetConfig { ret.linker = ret.compiler.clone(); } - if (ret.sources == Vec::::new()) && (ret.sources_cmd == String::from("")) { - panic!("fatal: must specify EITHER sources OR sources_cmd, not both."); - } - if !(ret.sources == Vec::::new()) && !(ret.sources_cmd == String::from("")) { - panic!("fatal: must specify EITHER sources OR sources_cmd"); + if ret.sources == Vec::::new() { + panic!("fatal: you MUST specify at least one source"); } ret