Skip to content

Commit

Permalink
Use recursive patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
jnyrup committed Jan 2, 2023
1 parent 1501630 commit 0981bc3
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -13,7 +13,7 @@ internal class MultiDimensionalArrayEquivalencyStep : IEquivalencyStep
{
public EquivalencyResult Handle(Comparands comparands, IEquivalencyValidationContext context, IEquivalencyValidator nestedValidator)
{
if (comparands.Expectation is not Array expectationAsArray || expectationAsArray?.Rank is 1)
if (comparands.Expectation is not Array { Rank: not 1 } expectationAsArray)
{
return EquivalencyResult.ContinueWithNext;
}
Expand Down

0 comments on commit 0981bc3

Please sign in to comment.