如何将布尔值转换为Option或Result in Rust? 内容来源于Stack Overflow,并遵循CC BY-SA ... 从Rust 1.50开始,您可以使用 assert_eq!(false.then(|| val), None); ...
確定! 回上一頁