1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-21 22:05:38 -04:00

Avoid unnecessary zero-length array allocations

This commit is contained in:
Qstick
2023-01-09 21:59:55 -06:00
parent b2c2c79a96
commit 0ed8ba828d
39 changed files with 77 additions and 66 deletions
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -91,7 +92,7 @@ namespace NzbDrone.Core.Test.MediaFiles
private void WasImportedResponse()
{
Mocker.GetMock<IDiskScanService>().Setup(c => c.GetVideoFiles(It.IsAny<string>(), It.IsAny<bool>()))
.Returns(new string[0]);
.Returns(Array.Empty<string>());
}
[Test]
@@ -140,7 +141,7 @@ namespace NzbDrone.Core.Test.MediaFiles
Mocker.GetMock<IDiskScanService>()
.Setup(c => c.GetVideoFiles(It.IsAny<string>(), It.IsAny<bool>()))
.Returns(new string[0]);
.Returns(Array.Empty<string>());
Subject.ProcessRootFolder(new DirectoryInfo(_droneFactory));