Skip to content

Commit

Permalink
Refactor and move code comment
Browse files Browse the repository at this point in the history
Move code comment to be inline with the thing it is commenting. Since
this block seems to require a code comment add white space to make it
more clear.

Refactor only, no logic change.
  • Loading branch information
tcharding committed Oct 11, 2023
1 parent 1ed13a9 commit 939695d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/policy/semantic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,11 @@ impl<Pk: MiniscriptKey> Policy<Pk> {

let n = subs.len() - unsatisfied_count - trivial_count; // remove all true/false
let m = k.checked_sub(trivial_count).map_or(0, |x| x); // satisfy all trivial
// m == n denotes `and` and m == 1 denotes `or`

// m == n denotes `and` and m == 1 denotes `or`
let is_and = m == n;
let is_or = m == 1;

for sub in subs {
match sub {
Policy::Trivial | Policy::Unsatisfiable => {}
Expand Down

0 comments on commit 939695d

Please sign in to comment.