-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Replace zip with zip_eq for iterator safety (#149)
* refactor: Replace zip with zip_eq for iterator safety - Replaced `.zip` method with `.zip_eq` from Itertools across multiple files to ensure equal length iteration between zipped arrays, - Updated the clippy configuration to disallow zip methods which do not check the size of their iterator arguments. - Removed redundant assertions and parallel processing that became unnecessary after the inclusion of `zip_eq`. - Updated import statements in numerous files to include `Itertools` from itertools for the efficient usage of iterator tools. - Added the `itertools` dependency version `0.12.0` to the `Cargo.toml` file. * refactor: Allow zip for unequal lengths in msm - Modified the `for` loop in the source provider `msm.rs`, replacing `zip_eq` with `zip` to populate variables. - Addressed Clippy warning for using disallowed methods by adding explicit permissions.
- Loading branch information
1 parent
8057e85
commit 61ff80a
Showing
20 changed files
with
66 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
type-complexity-threshold = 9999 | ||
too-many-arguments-threshold = 20 | ||
too-many-arguments-threshold = 20 | ||
disallowed-methods = [ | ||
# we are strict about size checks in iterators | ||
{ path = "core::iter::traits::iterator::Iterator::zip", reason = "use itertools::zip_eq instead" }, | ||
{ path = "rayon::iter::IndexedParallelIterator::zip", reason = "use rayon::iter::IndexedParallelIterator::zip_eq instead" }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.