Skip to content

Conversation

charleskorn
Copy link
Contributor

What this PR does

This PR is an alternative to #11741, which implements an idea from @bboreham here.

Compared to #11741, this avoids a need for a linter, at the cost of a slightly less obvious behaviour and slightly uglier code.

Which issue(s) this PR fixes or relates to

#11690

Checklist

  • Tests updated.
  • [n/a] Documentation added.
  • [n/a] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]. If changelog entry is not needed, please add the changelog-not-needed label to the PR.
  • [n/a] about-versioning.md updated with experimental features.

@charleskorn charleskorn added the changelog-not-needed PRs that don't need a CHANGELOG.md entry label Jun 27, 2025
Copy link
Contributor

@56quarters 56quarters left a comment

Choose a reason for hiding this comment

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

I prefer this approach instead of #11741 since this does not require a linter and when we make a mistake and pass a non-pointer to Put() the type system catches it.

@charleskorn charleskorn marked this pull request as ready for review June 29, 2025 23:26
@charleskorn charleskorn requested a review from a team as a code owner June 29, 2025 23:26
@charleskorn charleskorn merged commit bf08cdb into main Jun 29, 2025
33 checks passed
@charleskorn charleskorn deleted the charleskorn/ensure-pooled-slices-not-reused-v2 branch June 29, 2025 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-not-needed PRs that don't need a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants