Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Pan <[email protected]>
  • Loading branch information
Patrick Pan committed Feb 26, 2025
1 parent 8c7b38e commit 28d3be2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/OrasProject.Oras/Registry/Remote/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,7 @@ internal async IAsyncEnumerable<Descriptor> ReferrersByTagSchema(Descriptor desc
using (var stream = result.Stream)
{
var indexBytes = await stream.ReadAllAsync(result.Descriptor, cancellationToken).ConfigureAwait(false);
using var content = new MemoryStream(indexBytes);
var index = JsonSerializer.Deserialize<Index>(content) ?? throw new JsonException(
var index = JsonSerializer.Deserialize<Index>(indexBytes) ?? throw new JsonException(
$"error when deserialize index manifest for referrersTag {referrersTag}");
return (result.Descriptor, index.Manifests);
}
Expand Down

0 comments on commit 28d3be2

Please sign in to comment.