diff options
Diffstat (limited to 'crates/cfg')
-rw-r--r-- | crates/cfg/src/dnf.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/cfg/src/dnf.rs b/crates/cfg/src/dnf.rs index a08c307da..7ee7b0062 100644 --- a/crates/cfg/src/dnf.rs +++ b/crates/cfg/src/dnf.rs | |||
@@ -17,6 +17,15 @@ pub struct DnfExpr { | |||
17 | conjunctions: Vec<Conjunction>, | 17 | conjunctions: Vec<Conjunction>, |
18 | } | 18 | } |
19 | 19 | ||
20 | struct Conjunction { | ||
21 | literals: Vec<Literal>, | ||
22 | } | ||
23 | |||
24 | struct Literal { | ||
25 | negate: bool, | ||
26 | var: Option<CfgAtom>, // None = Invalid | ||
27 | } | ||
28 | |||
20 | impl DnfExpr { | 29 | impl DnfExpr { |
21 | pub fn new(expr: CfgExpr) -> Self { | 30 | pub fn new(expr: CfgExpr) -> Self { |
22 | let builder = Builder { expr: DnfExpr { conjunctions: Vec::new() } }; | 31 | let builder = Builder { expr: DnfExpr { conjunctions: Vec::new() } }; |
@@ -133,10 +142,6 @@ impl fmt::Display for DnfExpr { | |||
133 | } | 142 | } |
134 | } | 143 | } |
135 | 144 | ||
136 | struct Conjunction { | ||
137 | literals: Vec<Literal>, | ||
138 | } | ||
139 | |||
140 | impl Conjunction { | 145 | impl Conjunction { |
141 | fn new(parts: Vec<CfgExpr>) -> Self { | 146 | fn new(parts: Vec<CfgExpr>) -> Self { |
142 | let mut literals = Vec::new(); | 147 | let mut literals = Vec::new(); |
@@ -177,11 +182,6 @@ impl fmt::Display for Conjunction { | |||
177 | } | 182 | } |
178 | } | 183 | } |
179 | 184 | ||
180 | struct Literal { | ||
181 | negate: bool, | ||
182 | var: Option<CfgAtom>, // None = Invalid | ||
183 | } | ||
184 | |||
185 | impl Literal { | 185 | impl Literal { |
186 | fn new(expr: CfgExpr) -> Self { | 186 | fn new(expr: CfgExpr) -> Self { |
187 | match expr { | 187 | match expr { |