This removes the mut keyword from variable definitions and where variables are provided as arguments by reference where the variable or argument is not in fact mutated.
No APIs are changed.
Motivation
I find that it makes code easier to read when the mutability of identifiers is labelled accurately.
I did not read through all the code; after reading through some of it I used cargo clippy to identify unnecessary mut. This is by no means a complete solution but it did identify many cases.
Testing
I have run config64.py selecting a single algorithm and verified that the result satisfies cargo check.
I have repeated this with each of the 42 algorithms.
I also ran config64.py test for one algorithm; it built and ran all the tests successfully, including TestNHS which is the last on the list.
Changes
This removes the
mut
keyword from variable definitions and where variables are provided as arguments by reference where the variable or argument is not in fact mutated.No APIs are changed.
Motivation
I find that it makes code easier to read when the mutability of identifiers is labelled accurately.
I did not read through all the code; after reading through some of it I used
cargo clippy
to identify unnecessarymut
. This is by no means a complete solution but it did identify many cases.Testing
config64.py
selecting a single algorithm and verified that the result satisfiescargo check
.config64.py test
for one algorithm; it built and ran all the tests successfully, includingTestNHS
which is the last on the list.