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 some nightly lints 2024-01-12 #3738

Merged
merged 1 commit into from
Jan 12, 2024
Merged

Conversation

davidhewitt
Copy link
Member

Some lints are firing on latest nightly versions; hopefully this fixes them!

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Jan 12, 2024
.map(|p| p.value.0.clone())
.unwrap_or_else(|| syn::parse_str("::pyo3").unwrap())
match attr {
Some(attr) => attr.value.0.clone(),
Copy link
Member Author

Choose a reason for hiding this comment

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

Here nightly clippy didn't like the attr.as_ref().map(|attr| attr.value.0.clone()) and wanted attr.clone(), but I don't agree with that, because it's cloning more data than necessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

The new lint is way overly aggressive: rust-lang/rust-clippy#12135

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, it seems a bit broken. Thanks for filing that upstream 👍

@davidhewitt
Copy link
Member Author

Will just set this to merge and hope it goes in.

@davidhewitt davidhewitt added this pull request to the merge queue Jan 12, 2024
Copy link

codspeed-hq bot commented Jan 12, 2024

CodSpeed Performance Report

Merging #3738 will degrade performances by 18.05%

Comparing davidhewitt:nightly-lints (4504a7c) with main (4b17287)

Summary

⚡ 3 improvements
❌ 2 regressions
✅ 73 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main davidhewitt:nightly-lints Change
list_via_downcast 126.1 ns 153.9 ns -18.05%
list_via_extract 303.3 ns 275.6 ns +10.08%
not_a_list_via_downcast 126.1 ns 153.9 ns -18.05%
extract_int_downcast_fail 266.1 ns 238.3 ns +11.66%
extract_str_downcast_fail 266.1 ns 238.3 ns +11.66%

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 12, 2024
@davidhewitt davidhewitt added this pull request to the merge queue Jan 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 12, 2024
@davidhewitt davidhewitt added this pull request to the merge queue Jan 12, 2024
Merged via the queue into PyO3:main with commit 1520b05 Jan 12, 2024
36 of 38 checks passed
@davidhewitt davidhewitt deleted the nightly-lints branch January 12, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-skip-changelog Skip checking changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants