Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
FriggaHel committed Mar 29, 2024
1 parent 4beee86 commit ea463f7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions visual-dotnet/SauceLabs.Visual/BuildFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal static async Task<VisualBuild> Get(VisualApi api, CreateBuildOptions op
/// <returns>the matching region name</returns>
private static string? FindRegionByBuild(VisualBuild build)
{
return (from entry in Builds where entry.Value.Build == build select entry.Key).FirstOrDefault();
return Builds.Where(n => n.Value.Build == build).Select(n => n.Key).FirstOrDefault();
}

/// <summary>
Expand All @@ -63,10 +63,7 @@ private static async Task Close(string region, ApiBuildPair entry)
{
if (!entry.Build.IsExternal)
{
if (!entry.Build.IsExternal)
{
await entry.Api.FinishBuild(entry.Build.Id);
}
await entry.Api.FinishBuild(entry.Build.Id);
}
Builds.Remove(region);
entry.Api.Dispose();
Expand Down

0 comments on commit ea463f7

Please sign in to comment.