1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-27 23:06:29 -04:00

Use Length/Count property instead of Count() method to prevent enumerating

This commit is contained in:
Qstick
2023-01-09 22:08:20 -06:00
parent 4fe9daec03
commit e805f61450
14 changed files with 20 additions and 21 deletions
@@ -117,9 +117,9 @@ namespace NzbDrone.Core.Download.Pending
_logger.Debug("The release {0} is already pending with reason {1}, not adding again", decision.RemoteEpisode, reason);
}
if (matchingReports.Count() > 1)
if (matchingReports.Count > 1)
{
_logger.Debug("The release {0} had {1} duplicate pending, removing duplicates.", decision.RemoteEpisode, matchingReports.Count() - 1);
_logger.Debug("The release {0} had {1} duplicate pending, removing duplicates.", decision.RemoteEpisode, matchingReports.Count - 1);
foreach (var duplicate in matchingReports.Skip(1))
{