Skip to content

Commit

Permalink
sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
coenm committed May 17, 2024
1 parent 80be579 commit d9bcde5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/RepoM.App/RepositoryFiltering/RepositoryMatcher.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace RepoM.App.RepositoryFiltering;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
Expand Down Expand Up @@ -71,12 +72,12 @@ private bool HandleTerm(IRepository repository, TermBase termBase)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private bool HandleAnd(IRepository repository, AndQuery and)
{
return and.Items.All(query => Matches(repository, query));
return Array.TrueForAll(and.Items, query => Matches(repository, query));
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private bool HandleOr(IRepository repository, OrQuery or)
{
return or.Items.Any(query => Matches(repository, query));
return Array.Exists(or.Items, query => Matches(repository, query));
}
}

0 comments on commit d9bcde5

Please sign in to comment.