How do I convert a boolean to an integer in Rust?

前端 未结 4 1724
一个人的身影
一个人的身影 2021-01-17 10:03

How do I convert a boolean to an integer in Rust? As in, true becomes 1, and false becomes 0.

4条回答
提交回复
热议问题