Skip to content

Add scoped to MessagePackWriter.Write(ReadOnlySpan<T>) methods#2271

Merged
AArnott merged 1 commit into
masterfrom
scopedWrites
Jun 1, 2026
Merged

Add scoped to MessagePackWriter.Write(ReadOnlySpan<T>) methods#2271
AArnott merged 1 commit into
masterfrom
scopedWrites

Conversation

@AArnott

@AArnott AArnott commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@AArnott AArnott added this to the v3.1 milestone Jun 1, 2026
@AArnott
AArnott requested a review from Copilot June 1, 2026 17:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the public MessagePackWriter API to annotate the Write(ReadOnlySpan<T>) overloads with the C# scoped modifier, tightening lifetime/escape analysis for span-based inputs.

Changes:

  • Add scoped to MessagePackWriter.Write(ReadOnlySpan<byte>).
  • Add scoped to MessagePackWriter.Write(ReadOnlySpan<char>).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/MessagePack/MessagePackWriter.cs
Comment thread src/MessagePack/MessagePackWriter.cs
Comment thread src/MessagePack/MessagePackWriter.cs
Comment thread src/MessagePack/MessagePackWriter.cs
@AArnott
AArnott merged commit 7a306bd into master Jun 1, 2026
4 checks passed
@AArnott
AArnott deleted the scopedWrites branch June 1, 2026 18:09
This was referenced Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants