vnprc on Nostr: Well this was throwaway code so I didn't commit it. Here is the current version of ...
Well this was throwaway code so I didn't commit it. Here is the current version of that function: https://github.com/vnprc/hashpool/blob/master/protocols/v2/subprotocols/mining/src/cashu.rs#L608
I went with a helper function approach. The code is much cleaner this way. It was a battle to get the u64 out of Amount but even after that I was confused about why I had to interface a u64 with a usize.
Why does core::array:from_fn use usize? I haven't really dealt with this primitive before. Is this related to CPU architecture?
#rust, she is a demanding mistress.
I went with a helper function approach. The code is much cleaner this way. It was a battle to get the u64 out of Amount but even after that I was confused about why I had to interface a u64 with a usize.
Why does core::array:from_fn use usize? I haven't really dealt with this primitive before. Is this related to CPU architecture?
#rust, she is a demanding mistress.