chore: add back to/from i32 fns#765
Conversation
|
Thanks for the contribution. Rust convention is to use
Both functions can be backported to |
|
Agreed re Also agreed that we should add a |
|
Indeed, in rust-bitcoin where we use this function we have casts in both directions...when serializing, we do |
|
Hi @mattsse , are you working on this still mate? I just bumped into the issue. If you are not I'll push a PR. Thanks |
|
Added tracking issue just so this doesn't get lost. |
|
I'm going to close this -- it is untouched for over a year, affects only an obscure and unloved part of the API (which we are going to break anyway in bigger ways with fallout from #806), and we haven't gotten other complaints about this. We also changed this particular part of the API in #800 and I don't think we intend to double-back and improve the deprecation pathway after so long. |
in #743 these have been removed in favor of tryfrom/from traits.
this was a breaking change, the into 32 makes it a bit weirder to convert it to an u8.
id.to_i32() as u8is nowi32::from(id) as u8.imo it's reasonable to add them back, so this doesn't break for everyone that hasn't updated yet.