8000 fix clippy lints for Rust 1.86 by davidhewitt · Pull Request #1682 · pydantic/pydantic-core · GitHub
[go: up one dir, main page]

Skip to content

fix clippy lints for Rust 1.86 #1682

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

Merged
merged 1 commit into from
Apr 3, 2025
Merged

fix clippy lints for Rust 1.86 #1682

merged 1 commit into from
Apr 3, 2025

Conversation

davidhewitt
Copy link
Contributor

Change Summary

Fix lints for Rust 1.86

NB use of the write!(string, ...) macro instead of string.push_str(&format!(...)) is recommended by clippy because it's more efficient (avoids an intermediate allocation in the format!() call), and should be infallible just like push_str but we have to handle the results because other possible targets for write!() (like IO streams) might fail.

Because it should never fail, I chose to just .expect() these.

Related issue number

N/A

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@davidhewitt davidhewitt requested a review from Viicos April 3, 2025 14:29
@davidhewitt davidhewitt enabled auto-merge (squash) April 3, 2025 14:32
@davidhewitt davidhewitt merged commit ee8c173 into main Apr 3, 2025
28 checks passed
@davidhewitt davidhewitt deleted the dh/rust-1.86 branch April 3, 2025 14:35
Copy link
codspeed-hq bot commented Apr 3, 2025

CodSpeed Performance Report

Merging #1682 will not alter performance

Comparing dh/rust-1.86 (9f90c3a) with main (baa8cbf)

Summary

✅ 157 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development 399D

Successfully merging this pull request may close these issues.

2 participants
0