Skip to content

feat(operator)!: Implement Deref for kvp::Key#1182

Merged
Techassi merged 4 commits intomainfrom
feat/deref-kvp-key
Mar 27, 2026
Merged

feat(operator)!: Implement Deref for kvp::Key#1182
Techassi merged 4 commits intomainfrom
feat/deref-kvp-key

Conversation

@Techassi
Copy link
Copy Markdown
Member

@Techassi Techassi commented Mar 27, 2026

This PR implements Deref for kvp::Key to make working with that type more ergonomic and require less allocations when the string representation of the key is needed.

This PR however removes four (unused, see here and here) functions, which previously allowed mutable access to the inner values. We can only offer a Deref implementation if we uphold the guarantee that no mutable access to the inner values is possible. Otherwise, the cached string would need updating every time a mutable access is performed.

@Techassi Techassi marked this pull request as ready for review March 27, 2026 15:17
Copy link
Copy Markdown
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

LGTM

@Techassi Techassi enabled auto-merge March 27, 2026 15:17
@Techassi Techassi added this pull request to the merge queue Mar 27, 2026
Merged via the queue into main with commit 9620b45 Mar 27, 2026
5 checks passed
@Techassi Techassi deleted the feat/deref-kvp-key branch March 27, 2026 15:32
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