Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Clippy warnings due to 1.79 #1217

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Conversation

IvanIsCoding
Copy link
Collaborator

Currently CI is broken because Clippy introduced new lints in the 1.79 update. This PR fixes that

@IvanIsCoding IvanIsCoding added the automerge Queue a approved PR for merging label Jun 18, 2024
@coveralls
Copy link

coveralls commented Jun 18, 2024

Pull Request Test Coverage Report for Build 9558979447

Details

  • 17 of 20 (85.0%) changed or added relevant lines in 10 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.832%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rustworkx-core/src/planar/lr_planar.rs 0 1 0.0%
rustworkx-core/src/generators/random_graph.rs 1 3 33.33%
Totals Coverage Status
Change from base Build 9473947759: 0.0%
Covered Lines: 17382
Relevant Lines: 18138

💛 - Coveralls

@IvanIsCoding IvanIsCoding changed the title Fix Clippy warnigns due to 1.79 Fix Clippy warnings due to 1.79 Jun 18, 2024
@@ -577,7 +577,7 @@ macro_rules! custom_vec_iter_impl {
Err(PyIndexError::new_err(format!("Invalid index, {}", idx)))
} else if idx < 0 {
let len = self.$data.len();
Ok(self.$data[len - idx.abs() as usize].clone().into_py(py))
Ok(self.$data[len - idx.unsigned_abs()].clone().into_py(py))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I seem to remember some odd behavior around this specifically when we encountered this clippy check in the past. It might just have been an msrv thing though. It's passing all the tests so it's probably be fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was MSRV #609. We should have it by now I think

@mtreinish mtreinish merged commit cdb2b2f into Qiskit:main Jun 18, 2024
28 checks passed
@IvanIsCoding IvanIsCoding deleted the fix-clippy-179 branch June 18, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Queue a approved PR for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants