I need to print as debug a value from enum and format it. Then, I wrote this code like this:
#[derive(Debug)]
enum MyEnum {
AB,
}
fn main() {
let value = MyEnum::AB;
println!("[{: <3?}]", value);
}
But, the result is [AB] while I expected that the result is [AB ]. Why? How to add paddings in a debug print?