This PR makes clippy more strict. By adding pedantic, restriction, nursery and cargo lint groups to its config. Clearly some of the warnings need to be suppressed (the suppression list is minimal, i.e. removing any of if, without making any change in the code, will cause clippy to fail).
I think that most of the suppressed warnings, especially from the pedantic group, should be fixed in future.
Continuation of:
738
739
In the same spirit as:
TheAlgorithms/Java#5110
TheAlgorithms/Java#5122
TheAlgorithms/Java#5126
TheAlgorithms/Java#5144
TheAlgorithms/Java#5155
TheAlgorithms/Java#5165
Checklist:
[x] I ran bellow commands using the latest version of rust nightly.
[x] I ran cargo clippy --all -- -D warnings just before my last commit and fixed any issue that was found.
[x] I ran cargo fmt just before my last commit.
[x] I ran cargo test just before my last commit and all tests passed.
[x] I added my algorithm to the corresponding mod.rs file within its own folder, and in any parent folder(s).
[x] I added my algorithm to DIRECTORY.md with the correct link.
[x] I checked COUNTRIBUTING.md and my code follows its guidelines.
Please make sure that if there is a test that takes too long to run ( > 300ms), you #[ignore] that or
try to optimize your code or make the test easier to run. We have this rule because we have hundreds of
tests to run; If each one of them took 300ms, we would have to wait for a long time.
Pull Request Template
Description
This PR makes clippy more strict. By adding
pedantic
,restriction
,nursery
andcargo
lint groups to its config. Clearly some of the warnings need to be suppressed (the suppression list is minimal, i.e. removing any of if, without making any change in the code, will cause clippy to fail).I think that most of the suppressed warnings, especially from the
pedantic
group, should be fixed in future.Continuation of:
738
739
In the same spirit as:
Checklist:
cargo clippy --all -- -D warnings
just before my last commit and fixed any issue that was found.cargo fmt
just before my last commit.cargo test
just before my last commit and all tests passed.mod.rs
file within its own folder, and in any parent folder(s).DIRECTORY.md
with the correct link.COUNTRIBUTING.md
and my code follows its guidelines.Please make sure that if there is a test that takes too long to run ( > 300ms), you
#[ignore]
that or try to optimize your code or make the test easier to run. We have this rule because we have hundreds of tests to run; If each one of them took 300ms, we would have to wait for a long time.