如果要允许未使用的代码,在前面加上 #[allow(dead_code)] 即可。 参考文献: https://doc.rust-lang.org/rust-by-example/attribute/unused.html