Skip to content

Commit

Permalink
feat: use NotNullWhen attribute to help code analyzers
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertram Baltzer Andersen committed Mar 20, 2024
1 parent a3add13 commit b16d010
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Atc/Data/SemVer/SemanticVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ public static SemanticVersion Parse(
/// <returns>A boolean indicating success of the parse operation.</returns>
public static bool TryParse(
string input,
out SemanticVersion? result)
[NotNullWhen(true)] out SemanticVersion? result)
=> TryParse(input, looseMode: false, out result);

/// <summary>
Expand All @@ -419,7 +419,7 @@ public static bool TryParse(
public static bool TryParse(
string input,
bool looseMode,
out SemanticVersion? result)
[NotNullWhen(true)] out SemanticVersion? result)
{
try
{
Expand Down

0 comments on commit b16d010

Please sign in to comment.