This code works and does its job well, the problem is that I am still learning Rust (just finished the strings in rustlings) and wanted to do something others were doing in our CS class in Java. I still lack the knowledge and just general reflexes, and hope that someone will give some tips on how to reduce/optimise this code.
The goal of the code is to just turn a signed integer and change it into two's compliment binary notation.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=9cf51aaea7c5a824f78d0d2ffa41745b
A browser interface to the Rust compiler to experiment with the language