Skip to content

Commit

Permalink
#1924 Fix code scan missed opportunity to use Select
Browse files Browse the repository at this point in the history
  • Loading branch information
delager authored and kbeaugrand committed Jun 1, 2023
1 parent a0babbc commit 0d2797b
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,8 @@ private async Task<List<DescribeThingResponse>> GetAllThings()

var response = await amazonIoTClient.ListThingsAsync();

foreach (var thing in response.Things)
foreach (var requestDescribeThing in response.Things.Select(thing => new DescribeThingRequest { ThingName = thing.ThingName }))
{
var requestDescribeThing = new DescribeThingRequest
{
ThingName = thing.ThingName
};

things.Add(await this.amazonIoTClient.DescribeThingAsync(requestDescribeThing));
}

Expand Down

0 comments on commit 0d2797b

Please sign in to comment.