Skip to content

Commit

Permalink
Removed CanBeNull attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
alinasmirnova authored and AndreyAkinshin committed Oct 3, 2023
1 parent 5428ebd commit 7fbbc9f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/BenchmarkDotNet.Tests/XUnit/EnvRequirementChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ namespace BenchmarkDotNet.Tests.XUnit;

public static class EnvRequirementChecker
{
[CanBeNull]
public static string GetSkip(params EnvRequirement[] requirements) => requirements.Select(GetSkip).FirstOrDefault(skip => skip != null);
public static string? GetSkip(params EnvRequirement[] requirements) => requirements.Select(GetSkip).FirstOrDefault(skip => skip != null);

[CanBeNull]
internal static string GetSkip(EnvRequirement requirement) => requirement switch
internal static string? GetSkip(EnvRequirement requirement) => requirement switch
{
EnvRequirement.WindowsOnly => RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? null : "Windows-only test",
EnvRequirement.NonWindows => !RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? null : "Non-Windows test",
Expand Down

0 comments on commit 7fbbc9f

Please sign in to comment.