Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds List overloads for all scalar collection reading methods in the PbfBlockReader, providing an alternative to the existing buffer-based API. The changes include capacity optimization for List allocations, return type refinements from Span to ReadOnlySpan, and minor code style improvements.
- Added List overload methods for all collection reading operations (uint, ulong, int, long, signed variants, bool, float, double)
- Changed return types from Span to ReadOnlySpan for existing buffer-based collection reading methods
- Simplified lambda parameter syntax in delegate declarations
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/PbfLite/PbfLite.csproj | Version bumped from 0.1.0 to 0.2.1 to reflect new API additions |
| src/PbfLite/PbfBlockReader.Collections.cs | Added List overloads for all collection reading methods with capacity estimation, changed return types to ReadOnlySpan, simplified lambda syntax |
| src/PbfLite.Tests/PbfBlockReaderTests.Collections.cs | Made test class abstract, renamed test methods to remove "IntoBuffer" suffix, added unused delegate, whitespace cleanup |
| src/PbfLite.Tests/CollectionsRoundTripTests.cs | Whitespace formatting cleanup only |
| src/PbfLite.Benchmark/PbfBlockReaderCollectionsBenchmarks.cs | Added MemoryDiagnoser attribute, added explicit AsSpan() calls, added benchmark for List approach |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.