Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove redundant Count() in GlobalPackageFolderRepositories #6166

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public IReadOnlyList<SourceRepository> GlobalPackageFolderRepositories
var pathContext = NuGetPathContext.Create(Settings);

// count = FallbackPackageFolders.Count + 1 for UserPackageFolder
var count = (pathContext.FallbackPackageFolders?.Count() ?? 0) + 1;
var count = pathContext.FallbackPackageFolders.Count + 1;
var folders = new List<string>(count)
{
pathContext.UserPackageFolder
Expand Down Expand Up @@ -3477,7 +3477,7 @@ await BuildIntegratedRestoreUtility.ExecuteInitPs1ScriptsAsync(
if (dgSpecForParents.Restore.Count > 0)
{
// Restore and commit the lock file to disk regardless of the result
// This will restore all parents in a single restore
// This will restore all parents in a single restore
await DependencyGraphRestoreUtility.RestoreAsync(
dgSpecForParents,
referenceContext,
Expand Down