https://doc.rust-lang.org/std/fmt/trait.UpperHex.html
https://doc.rust-lang.org/std/fmt/trait.LowerHex.html
format x または X でできる
```rust
let x = 42
format!("{x:X}"); // => "2A"
format!("{x:x}"); // => "2a"
```
0埋めしたい場合は [[数値を0埋めしたい]] と合わせて以下のようにする
```rust
let x = 12
format!("{x:X}"); // => "0C"
```