From 0b2036a3fb10d33924de497767b85663f5e45a1c Mon Sep 17 00:00:00 2001 From: Kenneth Hsu Date: Mon, 31 Dec 2018 14:06:27 -0800 Subject: [PATCH] Simplify enumeration of collection. This reduces the number of enumerators that need to be created while also making the code slightly easier to read. --- Duplicati/Server/Runner.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Duplicati/Server/Runner.cs b/Duplicati/Server/Runner.cs index 159904752..f41ca8a12 100644 --- a/Duplicati/Server/Runner.cs +++ b/Duplicati/Server/Runner.cs @@ -768,7 +768,7 @@ namespace Duplicati.Server null, (n, a) => { - var existing = (a.Where(x => x.BackupID == backup.ID)).FirstOrDefault(); + var existing = a.FirstOrDefault(x => x.BackupID == backup.ID); if (existing == null) return n;