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

clean up some string handling cases #1381

Merged
merged 1 commit into from
Aug 2, 2024
Merged

clean up some string handling cases #1381

merged 1 commit into from
Aug 2, 2024

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

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
Member

@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
29 checks passed
@sydney-runkle sydney-runkle deleted the dh/string-tidys branch August 2, 2024 15:02
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