Commit 711f29e
committed
miniscript: make dissat_sat return a struct rather than a tuple
It is too easy to get the satisfactions and dissatisfactions confused. Use
a struct with named fields.
Curiously, outside of this module dissatisfactions are never used, so we can
keep the `dissat` field private. (Well, this is a bit of a sketchy thing to
say -- dissatisfactions **are** used by the Satisfaction::thresh and
thresh_mall functions, but those functions take dissats and sats as independent
Vecs they can manipulate, rather than taking a SatDissat struct.)1 parent 8ab549a commit 711f29e
2 files changed
Lines changed: 129 additions & 108 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
1029 | | - | |
| 1029 | + | |
1030 | 1030 | | |
1031 | 1031 | | |
1032 | 1032 | | |
| |||
1039 | 1039 | | |
1040 | 1040 | | |
1041 | 1041 | | |
1042 | | - | |
| 1042 | + | |
1043 | 1043 | | |
1044 | 1044 | | |
1045 | 1045 | | |
| |||
0 commit comments