Skip to content

Commit

Permalink
Merge pull request #308 from atc-net/feature/semver-not-null-when
Browse files Browse the repository at this point in the history
Use NotNullWhen attribute to help code analyzers
  • Loading branch information
davidkallesen authored Mar 20, 2024
2 parents a3add13 + b16d010 commit 4d74128
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 4d74128

Please sign in to comment.