Skip to content

Conversation

davidhewitt
Copy link
Contributor

Change Summary

Generally reduces use of needless .to_string() calls around the URL code, to avoid temporary strings. Done as a follow up to #1829

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 October 11, 2025 21:18
Copy link

codspeed-hq bot commented Oct 11, 2025

CodSpeed Performance Report

Merging #1833 will not alter performance

Comparing dh/url-efficiency (85cc156) with main (1e1c962)

Summary

✅ 163 untouched

} else {
Cow::Owned(encoded)
}
fn encode_userinfo_component(value: &str) -> impl fmt::Display + use<'_> {
Copy link
Member

Choose a reason for hiding this comment

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

Seems like the use<..> syntax is only available in Rust 2024.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep we need MSRV 1.82.

There is debate in PyO3 to increase MSRV to 1.83 PyO3/pyo3#5486, so let's just wait on this until 2.13 perhaps.

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

Successfully merging this pull request may close these issues.

2 participants