Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.35k stars 4.66k forks source link

Redundant ToArray() call in GetBlobsAsyncCollection class #45653

Closed rameel closed 2 weeks ago

rameel commented 1 month ago

Library name

Azure.Storage.Blobs

In the GetBlobsAsyncCollection class, there is an unnecessary call to ToArray() in the following code snippet: GetBlobsAsyncCollection.cs

            return Page<BlobItem>.FromValues(
                response.Value.Segment.BlobItems.ToBlobItems().ToArray(),
                response.Value.NextMarker,
                response.GetRawResponse());

The ToArray() method call is redundant because the ToBlobItems() method already returns an array.

github-actions[bot] commented 1 month ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

nickliu-msft commented 2 weeks ago

This issue has been resolved from this PR: https://github.com/Azure/azure-sdk-for-net/pull/45654