Skip to content

Conversation

@davidhewitt
Copy link
Contributor

Change Summary

  • Use &str instead of Cow<'_, str> in a couple places where it's good enough
  • Avoid some potential unsafety in converting a bytearray to a string

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

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 31, 2024

CodSpeed Performance Report

Merging #1381 will not alter performance

Comparing dh/string-tidys (90dfb74) with main (40b8a94)

Summary

✅ 155 untouched benchmarks

Copy link
Contributor

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

Looks great!

I just learned more about &str and Cow<'_, str>. This was easy to review - thanks!

@sydney-runkle sydney-runkle merged commit c5a4261 into main Aug 2, 2024
@sydney-runkle sydney-runkle deleted the dh/string-tidys branch August 2, 2024 15:02
davidhewitt added a commit to pydantic/pydantic that referenced this pull request Oct 20, 2025
davidhewitt added a commit to pydantic/pydantic that referenced this pull request Oct 22, 2025
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.

3 participants