TheAlgorithms / Rust

All Algorithms implemented in Rust
MIT License
21.51k stars 2.1k forks source link

style: make clippy more strict #743

Closed vil02 closed 3 weeks ago

vil02 commented 3 weeks ago

Pull Request Template

Description

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:

In the same spirit as:

Checklist:

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.