bitcoindevkit / coin-select

Tool to help you select inputs for making bitcoin transactions.
Other
12 stars 5 forks source link

Consider making `Drain` an enum, or using `Option::<Drain>::None` to represent no drain output(s). #16

Open evanlinjin opened 7 months ago

evanlinjin commented 7 months ago

Relevant Context:

LLFourn commented 7 months ago

90% of the time you will just .unwrap_or(0) on the values so I came to the conclusion that in this case it's better just to let 0 signify None. I could be convinced otherwise but the comment doesn't weigh putting it in an Option that against the cost of matching or copious .unwrap_or(0).