From b16d010f664083e063768bf26027a37719bd03bc Mon Sep 17 00:00:00 2001 From: Bertram Baltzer Andersen Date: Wed, 20 Mar 2024 13:52:09 +0400 Subject: [PATCH] feat: use NotNullWhen attribute to help code analyzers --- src/Atc/Data/SemVer/SemanticVersion.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Atc/Data/SemVer/SemanticVersion.cs b/src/Atc/Data/SemVer/SemanticVersion.cs index 3b3d6f83..1111e822 100644 --- a/src/Atc/Data/SemVer/SemanticVersion.cs +++ b/src/Atc/Data/SemVer/SemanticVersion.cs @@ -405,7 +405,7 @@ public static SemanticVersion Parse( /// A boolean indicating success of the parse operation. public static bool TryParse( string input, - out SemanticVersion? result) + [NotNullWhen(true)] out SemanticVersion? result) => TryParse(input, looseMode: false, out result); /// @@ -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 {