Help doesn't need Linq

This commit is contained in:
Matt Nadareski
2025-04-14 13:08:43 -04:00
parent 9179c4b337
commit 0f2990d706
2 changed files with 4 additions and 3 deletions

View File

@@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
namespace SabreTools.Help namespace SabreTools.Help
{ {
@@ -493,7 +492,10 @@ namespace SabreTools.Help
// If we haven't found a valid flag and we're not looking for just this feature, check to see if any of the subfeatures are valid // If we haven't found a valid flag and we're not looking for just this feature, check to see if any of the subfeatures are valid
if (!valid && !exact) if (!valid && !exact)
valid = Features.Keys.Any(k => Features[k]!.ValidateInput(input)); {
string[] featureKeys = [.. Features.Keys];
valid = Array.Exists(featureKeys, k => Features[k]!.ValidateInput(input));
}
return valid; return valid;
} }

View File

@@ -22,7 +22,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Net30.LinqBridge" Version="1.3.0" Condition="$(TargetFramework.StartsWith(`net2`))" />
<PackageReference Include="SabreTools.IO" Version="1.6.2" /> <PackageReference Include="SabreTools.IO" Version="1.6.2" />
</ItemGroup> </ItemGroup>