如何在Rust中打印布尔值?
let mut myFalseBool = false;
let mut myTrueBool = true;
//how do I print out the value of either bool?
用相同的方式打印任何值:
let foobar = true;
println!("{}", foobar);
dbg!(foobar);
输出:
true
[src/main.rs:4] foobar = true