Rust:variable does not need to be mutable警告解决方法
在Rust中,当你使用了mut
关键字声明变量,但你后面的代码并没对该关键字进行修改,则rust编译器会产生 variable does not need to be mutable
的警告提示;
解决方法:将该变量前的mut
关键字移除。
在Rust中,当你使用了mut
关键字声明变量,但你后面的代码并没对该关键字进行修改,则rust编译器会产生 variable does not need to be mutable
的警告提示;
解决方法:将该变量前的mut
关键字移除。
猜你喜欢
推荐