diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-06-25 19:52:16 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-09-16 12:32:19 +0200 |
commit | 415b83f6b19e93a026e8c92250a49fa500b0ccaf (patch) | |
tree | 5524b48cf35a8bb1cdb0e183b0832642d10c3a79 /src | |
parent | 96920d807ca871c619df8b5ea49c58c126c5df90 (diff) |
Impl Dependency::new_conditional() if in testing code
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/package/dependency/runtime.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/package/dependency/runtime.rs b/src/package/dependency/runtime.rs index 40ec93c..8c692ed 100644 --- a/src/package/dependency/runtime.rs +++ b/src/package/dependency/runtime.rs @@ -29,6 +29,13 @@ pub enum Dependency { }, } +#[cfg(test)] +impl Dependency { + pub fn new_conditional(name: String, condition: Condition) -> Self { + Dependency::Conditional { name, condition } + } +} + impl AsRef<str> for Dependency { fn as_ref(&self) -> &str { match self { |