diff options
author | Jonas Schievink <[email protected]> | 2020-10-23 11:10:22 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-10-23 11:12:03 +0100 |
commit | dab8870f5c6d90ea1a327037825dc87a46778045 (patch) | |
tree | 90917852dc07cff5083048054d8f893307ed6224 /crates/cfg | |
parent | bfe1efca26a9ae07d44ca3cc79ffdc4342f72b44 (diff) |
Reorder items
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 { |